ffdec: Add mpegversion 2 to AAC decoder caps

Fixes bug #651447.
This commit is contained in:
Raimo Järvi 2011-05-30 13:14:09 +03:00 committed by Sebastian Dröge
parent 9db205f9f7
commit 82463fe8bc

View file

@ -961,13 +961,23 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
case CODEC_ID_AAC:
{
caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg",
"mpegversion", G_TYPE_INT, 4, NULL);
caps = gst_ff_aud_caps_new (context, codec_id, "audio/mpeg", NULL);
if (!encode) {
GValue arr = { 0, };
GValue item = { 0, };
g_value_init (&arr, GST_TYPE_LIST);
g_value_init (&item, G_TYPE_INT);
g_value_set_int (&item, 2);
gst_value_list_append_value (&arr, &item);
g_value_set_int (&item, 4);
gst_value_list_append_value (&arr, &item);
g_value_unset (&item);
gst_caps_set_value (caps, "mpegversion", &arr);
g_value_unset (&arr);
g_value_init (&arr, GST_TYPE_LIST);
g_value_init (&item, G_TYPE_STRING);
g_value_set_string (&item, "raw");
@ -981,7 +991,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
gst_caps_set_value (caps, "stream-format", &arr);
g_value_unset (&arr);
} else {
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "raw",
gst_caps_set_simple (caps, "mpegversion", G_TYPE_INT, 4,
"stream-format", G_TYPE_STRING, "raw",
"base-profile", G_TYPE_STRING, "lc", NULL);
if (context && context->extradata_size > 0)