[Bug 722144] audiodecoder: do not negotiate caps with rate=1 and channels=1 for gap
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Jan 15 09:16:58 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=722144
GStreamer | gst-plugins-base | unspecified
Sebastian Dröge (slomo) <slomo> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #266371|none |needs-work
status| |
--- Comment #14 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2014-01-15 17:16:53 UTC ---
Review of attachment 266371:
--> (https://bugzilla.gnome.org/review?bug=722144&attachment=266371)
Some comments still, the loop optimizations obviously apply to all of the loops
::: gst-libs/gst/audio/gstaudiodecoder.c
@@ +1871,3 @@
+ }
+
+ for (i = 0; i < gst_caps_get_size (caps); i++) {
Don't put gst_caps_get_size() in the loop but get the value before it and store
it in a variable
@@ +1874,3 @@
+ gst_structure_fixate_field_nearest_int (gst_caps_get_structure (caps, i),
+ "channels", GST_AUDIO_DEF_CHANNELS);
+ gst_structure_fixate_field_nearest_int (gst_caps_get_structure (caps, i),
Only get the structure once per iteration and store it in a variable
@@ +1880,3 @@
+
+ /* Need to add a channel-mask if channels > 2 */
+ if (channels > 2
You need to get channels from the caps again after fixation, they might be
different (if no incaps and DEF_CHANNELS is not supported)
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list