Commit 97015d3c authored by Alban Browaeys's avatar Alban Browaeys Committed by Sebastian Dröge

flvdemux: Add flvversion 1 to the flash-video caps

This allows using avdec_flv which requires this field to be
present in the caps. FLV only supports flash-video version 1
right now.

https://bugzilla.gnome.org/show_bug.cgi?id=703076
parent 5f6469fe
......@@ -76,7 +76,7 @@ static GstStaticPadTemplate video_src_template =
GST_STATIC_PAD_TEMPLATE ("video",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
GST_STATIC_CAPS ("video/x-flash-video; "
GST_STATIC_CAPS ("video/x-flash-video, flvversion=(int) 1; "
"video/x-flash-screen; "
"video/x-vp6-flash; " "video/x-vp6-alpha; "
"video/x-h264, stream-format=avc;")
......@@ -1183,7 +1183,9 @@ gst_flv_demux_video_negotiate (GstFlvDemux * demux, guint32 codec_tag)
/* Generate caps for that pad */
switch (codec_tag) {
case 2:
caps = gst_caps_new_empty_simple ("video/x-flash-video");
caps =
gst_caps_new_simple ("video/x-flash-video", "flvversion", G_TYPE_INT,
1, NULL);
break;
case 3:
caps = gst_caps_new_empty_simple ("video/x-flash-screen");
......@@ -1699,6 +1701,17 @@ gst_flv_demux_parse_header (GstFlvDemux * demux, GstBuffer * buffer)
}
}
if (map.data[3] == '1') {
GST_DEBUG_OBJECT (demux, "FLV version 1 detected");
} else {
if (G_UNLIKELY (demux->strict)) {
GST_WARNING_OBJECT (demux, "invalid header version detected");
ret = GST_FLOW_EOS;
goto beach;
}
}
/* Now look at audio/video flags */
{
guint8 flags = map.data[4];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment