Commit 6183f831 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

qtdemux: add support for 'vc-1' mapping as found in some ismv files

e.g. To_The_Limit_720_2962.ismv
parent 276269d9
......@@ -8092,6 +8092,45 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
gst_buffer_unref (buf);
break;
}
case GST_MAKE_FOURCC ('v', 'c', '-', '1'):
{
gint len = QT_UINT32 (stsd_data) - 0x66;
const guint8 *vc1_data = stsd_data + 0x66;
/* find dvc1 */
while (len >= 8) {
gint size;
if (QT_UINT32 (vc1_data) <= len)
size = QT_UINT32 (vc1_data) - 8;
else
size = len - 8;
if (size < 1)
/* No real data, so break out */
break;
switch (QT_FOURCC (vc1_data + 0x4)) {
case GST_MAKE_FOURCC ('d', 'v', 'c', '1'):
{
GstBuffer *buf;
GST_DEBUG_OBJECT (qtdemux, "found dvc1 codec_data in stsd");
buf = gst_buffer_new_and_alloc (size);
gst_buffer_fill (buf, 0, vc1_data + 8, size);
gst_caps_set_simple (stream->caps,
"codec_data", GST_TYPE_BUFFER, buf, NULL);
gst_buffer_unref (buf);
break;
}
default:
break;
}
len -= size + 8;
vc1_data += size + 8;
}
break;
}
default:
break;
}
......@@ -10906,6 +10945,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING,
"4444", NULL);
break;
case GST_MAKE_FOURCC ('v', 'c', '-', '1'):
case FOURCC_ovc1:
_codec ("VC-1");
caps = gst_caps_new_simple ("video/x-wmv",
......
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