After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 533581 - [mad] inconsistent use of rate and channels
[mad] inconsistent use of rate and channels
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal normal
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 549326 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-05-17 15:38 UTC by Edward Hervey
Modified: 2008-09-01 09:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use stored rate/channels values (2.28 KB, patch)
2008-05-17 15:39 UTC, Edward Hervey
committed Details | Review

Description Edward Hervey 2008-05-17 15:38:28 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.
Comment 1 Edward Hervey 2008-05-17 15:39:36 UTC
Created attachment 111051 [details] [review]
use stored rate/channels values
Comment 2 Jan Schmidt 2008-05-19 13:25:18 UTC
This looks good and correct. There's a small typo in a g_warning: s/ratee/rate/

Otherwise, feel free to commit.
Comment 3 Edward Hervey 2008-05-19 15:07:41 UTC
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

Comment 4 Tim-Philipp Müller 2008-09-01 09:13:16 UTC
*** Bug 549326 has been marked as a duplicate of this bug. ***