[Bug 777211] omxaacenc: Fix samples per buffer calculation
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Fri Jan 13 15:17:44 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=777211
Tim-Philipp Müller <t.i.m at zen.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #343436|none |needs-work
status| |
--- Comment #7 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 343436
--> https://bugzilla.gnome.org/attachment.cgi?id=343436
omxaacenc: Fix samples per buffer calculation
>@@ -393,6 +393,8 @@ gst_omx_aac_enc_get_caps (GstOMXAudioEnc * enc, GstOMXPort * port,
> gint mpegversion = 4;
> const gchar *stream_format = NULL, *profile = NULL;
>
>+ ((GstOMXAACEnc *)enc)->samples_per_frame = 1024;
>@@ -493,6 +495,8 @@ gst_omx_aac_enc_get_caps (GstOMXAudioEnc * enc, GstOMXPort * port,
> GST_DEBUG_OBJECT (enc, "setting new codec_data");
> gst_caps_set_simple (caps, "codec_data", GST_TYPE_BUFFER, codec_data, NULL);
>
>+ ((GstOMXAACEnc *)enc)->samples_per_frame = map.data[1] & 4 ? 960 : 1024;
>+
Please add a local variable for this instead of doing the cast inline, twice :)
>+ ((GstOMXAACEnc *)enc)->samples_per_frame = map.data[1] & 4 ? 960 : 1024;
I think this assumes that no 'unusual' sample rate is used (otherwise there's
an extra 24 bit or so for the sample rate). I don't see a restriction on input
sample rates in the caps anywhere, but only had a quick look.
--
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