GNOME Bugzilla – Bug 151661
[PATCH] [mad] Possible bug in mad plugin
Last modified: 2005-01-09 01:57:51 UTC
Hi, I've got a problem when trying to decode a mp3 file (filesrc location=a.mp3 ! mad ! ...). I've founded that the caps was'nt set correctly. I think this problem come from the method use to recover from a "MAD_ERROR_LOST_SYNC". Actually, when this happen and the data is a id3tag, then "mad_stream_skip" is used to move at the and of the current tag, and it is followed by a call to "mad_stream_sync". However, I've founded that "mad_stream_sync" does'nt move the actual data pointer, but only set an internal offset/skip value. So, "mad_stram_sync" move the data pointer to the next frame and the next time you call mad_decode, the offset will be applied. Of course, the position will now be wrong and will cause the decoder to return a sync error once again. I think we should not call "mad_stram_sync" when "mad_stream_skip" has just been called. OR, "mad_stream_skip" should consider the skip/offset if there is one.
Created attachment 31803 [details] [review] Proposed patch
Adding patch keyword and setting milestone to be sure this gets reviewed before next release of gst-plugins.
DON'T milestone to next release without a possible resolution
Francis, * do you have a testcase that I can test this against? * can you please not use hungary coding style? bResync -> resync.
Created attachment 35622 [details] Sample causing me the problem
ok, seems sane, applied, thanks.