tsdemux: expose VC1 streams with missing descriptor.

Fixes playback of VC1 streams when the descriptor is missing.
This commit is contained in:
Josep Torra 2013-02-05 23:07:12 +01:00
parent 9444776aff
commit 7fafbe2e22

View file

@ -860,23 +860,28 @@ create_pad_for_stream (MpegTSBase * base, MpegTSBaseStream * bstream,
break; break;
case ST_PRIVATE_EA: /* Try to detect a VC1 stream */ case ST_PRIVATE_EA: /* Try to detect a VC1 stream */
{ {
gboolean is_vc1 = FALSE;
desc = desc =
mpegts_get_descriptor_from_stream ((MpegTSBaseStream *) stream, mpegts_get_descriptor_from_stream ((MpegTSBaseStream *) stream,
DESC_REGISTRATION); DESC_REGISTRATION);
if (desc) { if (desc) {
if (DESC_LENGTH (desc) >= 4) { if (DESC_LENGTH (desc) >= 4) {
if (DESC_REGISTRATION_format_identifier (desc) == DRF_ID_VC1) { if (DESC_REGISTRATION_format_identifier (desc) == DRF_ID_VC1) {
GST_WARNING ("0xea private stream type found but no descriptor " is_vc1 = TRUE;
"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);
} }
} }
g_free (desc); 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; break;
} }
case ST_BD_AUDIO_AC3: case ST_BD_AUDIO_AC3: