mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
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
1 changed files with 11 additions and 5 deletions
|
@ -422,16 +422,22 @@ gst_dvd_demux_handle_dvd_event (GstDVDDemux * dvd_demux, GstEvent * event)
|
|||
}
|
||||
|
||||
/* subtitle */
|
||||
for (;;) {
|
||||
t = g_strdup_printf ("subtitle-%d-language", num_substreams);
|
||||
for (n = 0; n < GST_DVD_DEMUX_NUM_SUBPICTURE_STREAMS; n++) {
|
||||
t = g_strdup_printf ("subtitle-%d-language", n);
|
||||
if (!gst_structure_get_value (structure, t)) {
|
||||
g_free (t);
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
g_free (t);
|
||||
CLASS (dvd_demux)->get_subpicture_stream (mpeg_demux,
|
||||
num_substreams++, GST_DVD_DEMUX_SUBP_DVD, NULL);
|
||||
num_substreams = n + 1;
|
||||
}
|
||||
|
||||
/* 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,
|
||||
"Created 1 video stream, %d audio streams and %d subpicture streams "
|
||||
"based on DVD lang codes event; now signalling no-more-pads",
|
||||
|
|
Loading…
Reference in a new issue