mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +00:00
tsdemux: expose VC1 streams with missing descriptor.
Fixes playback of VC1 streams when the descriptor is missing.
This commit is contained in:
parent
9444776aff
commit
7fafbe2e22
1 changed files with 12 additions and 7 deletions
|
@ -860,23 +860,28 @@ create_pad_for_stream (MpegTSBase * base, MpegTSBaseStream * bstream,
|
|||
break;
|
||||
case ST_PRIVATE_EA: /* Try to detect a VC1 stream */
|
||||
{
|
||||
gboolean is_vc1 = FALSE;
|
||||
desc =
|
||||
mpegts_get_descriptor_from_stream ((MpegTSBaseStream *) stream,
|
||||
DESC_REGISTRATION);
|
||||
if (desc) {
|
||||
if (DESC_LENGTH (desc) >= 4) {
|
||||
if (DESC_REGISTRATION_format_identifier (desc) == DRF_ID_VC1) {
|
||||
GST_WARNING ("0xea private stream type found but no descriptor "
|
||||
"for VC1. Assuming plain VC1.");
|
||||
template = gst_static_pad_template_get (&video_template);
|
||||
name = g_strdup_printf ("video_%04x", bstream->pid);
|
||||
caps = gst_caps_new_simple ("video/x-wmv",
|
||||
"wmvversion", G_TYPE_INT, 3,
|
||||
"format", G_TYPE_STRING, "WVC1", NULL);
|
||||
is_vc1 = TRUE;
|
||||
}
|
||||
}
|
||||
g_free (desc);
|
||||
}
|
||||
if (!is_vc1) {
|
||||
GST_WARNING ("0xea private stream type found but no descriptor "
|
||||
"for VC1. Assuming plain VC1.");
|
||||
}
|
||||
|
||||
template = gst_static_pad_template_get (&video_template);
|
||||
name = g_strdup_printf ("video_%04x", bstream->pid);
|
||||
caps = gst_caps_new_simple ("video/x-wmv",
|
||||
"wmvversion", G_TYPE_INT, 3, "format", G_TYPE_STRING, "WVC1", NULL);
|
||||
|
||||
break;
|
||||
}
|
||||
case ST_BD_AUDIO_AC3:
|
||||
|
|
Loading…
Reference in a new issue