From d44d498aa4550446347f1547ba1be10322f6933f Mon Sep 17 00:00:00 2001 From: Zaheer Abbas Merali Date: Mon, 4 Apr 2011 10:31:44 +0100 Subject: [PATCH] flv: Specify the only possible stream-format for h264 in the pad templates. --- gst/flv/gstflvdemux.c | 7 +++++-- gst/flv/gstflvmux.c | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index 79f83bc..820f689 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -70,7 +70,8 @@ static GstStaticPadTemplate video_src_template = GST_PAD_SOMETIMES, GST_STATIC_CAPS ("video/x-flash-video; " "video/x-flash-screen; " - "video/x-vp6-flash; " "video/x-vp6-alpha; " "video/x-h264;") + "video/x-vp6-flash; " "video/x-vp6-alpha; " + "video/x-h264, stream-format=avc;") ); GST_DEBUG_CATEGORY_STATIC (flvdemux_debug); @@ -1057,7 +1058,9 @@ gst_flv_demux_video_negotiate (GstFlvDemux * demux, guint32 codec_tag) caps = gst_caps_new_simple ("video/x-vp6-alpha", NULL); break; case 7: - caps = gst_caps_new_simple ("video/x-h264", NULL); + caps = + gst_caps_new_simple ("video/x-h264", "stream-format", G_TYPE_STRING, + "avc", NULL); break; default: GST_WARNING_OBJECT (demux, "unsupported video codec tag %u", codec_tag); diff --git a/gst/flv/gstflvmux.c b/gst/flv/gstflvmux.c index c128d34..005570d 100644 --- a/gst/flv/gstflvmux.c +++ b/gst/flv/gstflvmux.c @@ -63,7 +63,8 @@ static GstStaticPadTemplate videosink_templ = GST_STATIC_PAD_TEMPLATE ("video", GST_PAD_REQUEST, GST_STATIC_CAPS ("video/x-flash-video; " "video/x-flash-screen; " - "video/x-vp6-flash; " "video/x-vp6-alpha; " "video/x-h264;") + "video/x-vp6-flash; " "video/x-vp6-alpha; " + "video/x-h264, stream-format=avc;") ); static GstStaticPadTemplate audiosink_templ = GST_STATIC_PAD_TEMPLATE ("audio", -- 2.7.4