Opened 10 years ago

Closed 10 years ago

#1564 closed defect (fixed)

[patch] demuxer (esp. ogg) too verbose on track changes

Reported by: hhaamu@… Owned by: r_togni@…
Priority: normal Component: demuxer
Version: HEAD Severity: minor
Keywords: Cc: reimar
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

The demuxer prints a line notifying on tag changes. However, it doesn't bother to check whether the tag value is the same as it previously was.

Example:
$ cat *.ogg | mplayer -demuxer ogg -
[...]
Starting playback...
Demuxer info Creation Date changed to 1989
Demuxer info Artist changed to John Zorn
Demuxer info Title changed to The Sicilian Clan
Demuxer info Album changed to Naked City
Demuxer info Genre changed to Avant-garde
Demuxer info Track changed to 2/26
Demuxer info Creation Date changed to 1989
Demuxer info Artist changed to John Zorn
Demuxer info Title changed to You Will Be Shot
Demuxer info Album changed to Naked City
Demuxer info Genre changed to Avant-garde
Demuxer info Track changed to 3/26

Lots of duplicate output.

Attachments (1)

mplayersilentdemuxer.diff (534 bytes) - added by hhaamu@… 10 years ago.
patch

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by hhaamu@…

patch

comment:1 Changed 10 years ago by hhaamu@…

Output with patch:

Starting playback...
Demuxer info Title changed to The Sicilian Clan
Demuxer info Track changed to 2/26
Demuxer info Title changed to You Will Be Shot
Demuxer info Track changed to 3/26

comment:2 Changed 10 years ago by reimar

  • Cc Reimar.Doeffinger@… added

I think I'd prefer this one, can you test it:
Index: libmpdemux/demuxer.c
===================================================================
--- libmpdemux/demuxer.c (revision 29672)
+++ libmpdemux/demuxer.c (working copy)
@@ -1144,6 +1261,10 @@

for (n = 0; info && info[2 * n] != NULL; n++) {

if (!strcasecmp(opt, info[2 * n])) {

+ if (!strcmp(param, info[2 * n + 1])) {
+ mp_msg(MSGT_DEMUX, MSGL_V, "Demuxer info %s set to unchanged value %s\n", opt, param);
+ return 0;
+ }

mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_DemuxerInfoChanged, opt,

param);

free(info[2 * n + 1]);

comment:3 Changed 10 years ago by hhaamu@…

(In reply to comment #2)

I think I'd prefer this one

You're correct -- it needs the return clause. Shame on me for not looking at the rest of the function. Your version works just fine (but I don't really have anything other than chained oggs to test it on)

comment:4 Changed 10 years ago by reimar

  • Resolution set to fixed
  • Status changed from new to closed

Mostly I just wanted to keep some output with -v for debugging purposes, but you are right that I accidentally also avoided a bug :-).
Anyway applied.

Note: See TracTickets for help on using tickets.