mpegtsdemux: fix silly way of creating caps

This commit is contained in:
Tim-Philipp Müller 2011-01-10 11:25:47 +00:00
parent 0b4dfa685d
commit d4441a3025

View File

@ -2089,15 +2089,11 @@ mpegts_try_discover_packet_size (MpegTSPacketizer * packetizer)
if (dest[i] == 0x47 && dest[i + packetsize] == 0x47 && if (dest[i] == 0x47 && dest[i + packetsize] == 0x47 &&
dest[i + packetsize * 2] == 0x47 && dest[i + packetsize * 2] == 0x47 &&
dest[i + packetsize * 3] == 0x47) { dest[i + packetsize * 3] == 0x47) {
gchar *str;
packetizer->know_packet_size = TRUE; packetizer->know_packet_size = TRUE;
packetizer->packet_size = packetsize; packetizer->packet_size = packetsize;
str = packetizer->caps = gst_caps_new_simple ("video/mpegts",
g_strdup_printf "systemstream", G_TYPE_BOOLEAN, TRUE,
("video/mpegts, systemstream=(boolean)true, packetsize=%d", "packetsize", packetsize, NULL);
packetsize);
packetizer->caps = gst_caps_from_string ((const gchar *) str);
g_free (str);
pos = i; pos = i;
break; break;
} }