GNOME Bugzilla – Bug 321857
[mp3parse] needs to post DURATION message for VBR mp3s
Last modified: 2008-05-05 08:43:26 UTC
Duration queries are cached. This is not desirable when we have VBR mp3s where the first query might have been very inaccurate. mad needs to post a DURATION message on the bus to clear the duration query cache and/or inform the application that it should query again for a better value in case of VBRs.
Hmm, but VBR mp3s commonly have the "duration" system tag. It is parsed very early and all applications use this tag for finding out mp3 duration, because quering is not exact at least until a large segment of data have been played back.
Created attachment 76968 [details] [review] simple patch Simple patch; might cause a bit too much flooding, not sure. Haven't tested it extensively.
I've added something like this to mp3parse now. Implementing it in mad too seems unnecessary as with recently new gst-plugins-ugly mp3parse will always be autoplugged before mad and used for duration queries and similar things. 2008-05-05 Sebastian Dröge <slomo@circular-chaos.org> * gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_emit_frame): Send a new duration message if the average bitrate changed and we don't know the duration from the Xing or VBRI header. Fixes bug #321857.