amcaudiodec: Set "is-adts" to 1 for ADTS AAC

Otherwise it fails to decode.

https://bugzilla.gnome.org/show_bug.cgi?id=740101
This commit is contained in:
Sebastian Dröge 2016-12-15 14:05:09 +02:00
parent 5e3157098a
commit 3357ddb0e1

View file

@ -882,6 +882,21 @@ gst_amc_audio_dec_set_format (GstAudioDecoder * decoder, GstCaps * caps)
return FALSE;
}
if (gst_structure_has_name (s, "audio/mpeg")) {
gint mpegversion;
const gchar *stream_format;
if (!gst_structure_get_int (s, "mpegversion", &mpegversion))
mpegversion = -1;
stream_format = gst_structure_get_string (s, "stream-format");
if (mpegversion == 4 && g_strcmp0 (stream_format, "adts") == 0) {
gst_amc_format_set_int (format, "is-adts", 1, &err);
if (err)
GST_ELEMENT_WARNING_FROM_ERROR (self, err);
}
}
/* FIXME: These buffers needs to be valid until the codec is stopped again */
g_list_foreach (self->codec_datas, (GFunc) gst_buffer_unref, NULL);
g_list_free (self->codec_datas);