mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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
This commit is contained in:
parent
5f6469fe2a
commit
97015d3c93
1 changed files with 15 additions and 2 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue