From d1fac3e77936fa2f56101109d49b6b442d1e75ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 27 May 2011 10:54:12 +0200 Subject: [PATCH] ffenc_aac: Add profile and level to the caps Fixes bug #650596. --- ext/ffmpeg/Makefile.am | 2 +- ext/ffmpeg/gstffmpegcodecmap.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ext/ffmpeg/Makefile.am b/ext/ffmpeg/Makefile.am index 3c02817..482807e 100644 --- a/ext/ffmpeg/Makefile.am +++ b/ext/ffmpeg/Makefile.am @@ -21,7 +21,7 @@ libgstffmpeg_la_SOURCES = gstffmpeg.c \ # gstffmpegscale.c libgstffmpeg_la_CFLAGS = $(FFMPEG_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) -libgstffmpeg_la_LIBADD = $(FFMPEG_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LIBM) $(WIN32_LIBS) -lz $(BZ2_LIBS) +libgstffmpeg_la_LIBADD = $(FFMPEG_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) -lgstpbutils-$(GST_MAJORMINOR) $(LIBM) $(WIN32_LIBS) -lz $(BZ2_LIBS) libgstffmpeg_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(DARWIN_LDFLAGS) libgstffmpeg_la_LIBTOOLFLAGS = --tag=disable-static diff --git a/ext/ffmpeg/gstffmpegcodecmap.c b/ext/ffmpeg/gstffmpegcodecmap.c index 5cd0a80..7628095 100644 --- a/ext/ffmpeg/gstffmpegcodecmap.c +++ b/ext/ffmpeg/gstffmpegcodecmap.c @@ -33,6 +33,8 @@ #include "gstffmpeg.h" #include "gstffmpegcodecmap.h" +#include + /* * Read a palette from a caps. */ @@ -979,7 +981,12 @@ 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", NULL); + gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "raw", + "base-profile", G_TYPE_STRING, "lc", NULL); + + if (context && context->extradata_size > 0) + gst_codec_utils_aac_caps_set_level_and_profile (caps, + context->extradata, context->extradata_size); } break; -- 2.7.4