dvddemux: tweak subtitle stream setup based on dvd language codes event
... to allow for non-continuous subtitle stream numbers. The missing stream numbers tend to come up as subtitle streams anyway (albeit not with an identified language tag).
This commit is contained in:
parent
692f6b5d95
commit
cacc663b35
@ -422,16 +422,22 @@ gst_dvd_demux_handle_dvd_event (GstDVDDemux * dvd_demux, GstEvent * event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* subtitle */
|
/* subtitle */
|
||||||
for (;;) {
|
for (n = 0; n < GST_DVD_DEMUX_NUM_SUBPICTURE_STREAMS; n++) {
|
||||||
t = g_strdup_printf ("subtitle-%d-language", num_substreams);
|
t = g_strdup_printf ("subtitle-%d-language", n);
|
||||||
if (!gst_structure_get_value (structure, t)) {
|
if (!gst_structure_get_value (structure, t)) {
|
||||||
g_free (t);
|
g_free (t);
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
g_free (t);
|
g_free (t);
|
||||||
CLASS (dvd_demux)->get_subpicture_stream (mpeg_demux,
|
num_substreams = n + 1;
|
||||||
num_substreams++, GST_DVD_DEMUX_SUBP_DVD, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* now we have a maximum,
|
||||||
|
* and can also fill empty slots in case of cranky DVD */
|
||||||
|
for (n = 0; n < num_substreams; n++)
|
||||||
|
CLASS (dvd_demux)->get_subpicture_stream (mpeg_demux,
|
||||||
|
n, GST_DVD_DEMUX_SUBP_DVD, NULL);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (dvd_demux,
|
GST_DEBUG_OBJECT (dvd_demux,
|
||||||
"Created 1 video stream, %d audio streams and %d subpicture streams "
|
"Created 1 video stream, %d audio streams and %d subpicture streams "
|
||||||
"based on DVD lang codes event; now signalling no-more-pads",
|
"based on DVD lang codes event; now signalling no-more-pads",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user