GNOME Bugzilla – Bug 533581
[mad] inconsistent use of rate and channels
Last modified: 2008-09-01 09:13:16 UTC
the mad plugin currently uses values from the mad_frame structure in places where we risk getting inconsistent values. For example, when scrubbing on big files, we risk triggering the "failed sync after seek" case... but the new rate/channels values are not stored until we get that error three times in a row (see gst_mad_check_caps_reset()). Then when the chain function is going to calculate the number of samples of the incoming buffer, it will be using the bogus rate/channels and not the stored values. This can cause issues as weird as giving negative durations for buffers.
Created attachment 111051 [details] [review] use stored rate/channels values
This looks good and correct. There's a small typo in a g_warning: s/ratee/rate/ Otherwise, feel free to commit.
2008-05-19 Edward Hervey <edward.hervey@collabora.co.uk> * ext/mad/gstmad.c: (gst_mad_convert_src), (gst_mad_chain): Fix inconsistent use of rate and channels. Fixes #533581
*** Bug 549326 has been marked as a duplicate of this bug. ***