diff options
author | Edward Hervey <edward@centricular.com> | 2015-11-25 17:08:56 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2015-12-02 14:12:55 +0100 |
commit | f173bd7d16a491bf13d08635b5170a8a6fc01306 (patch) | |
tree | 288dbb1d7bc2808ac05bf8ab6fa8e3ff8156b378 | |
parent | 0b234c9b547195918ffaff2260bdda284c58715c (diff) |
avidemux: Properly set SPARSE stream flags for subpicture/subtitle
And while we're at it, also detect 'DXSA' as being a variant fourcc
of 'DXSB' for XSUB
-rw-r--r-- | gst/avi/gstavidemux.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index a12cb2015..4a80cd603 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -2017,6 +2017,7 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf) GstEvent *event; gchar *stream_id; GstMapInfo map; + gboolean sparse = FALSE; element = GST_ELEMENT_CAST (avi); @@ -2284,7 +2285,8 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf) stream->strf.vids, stream->extradata, stream->initdata, &codec_name); /* DXSB is XSUB, and it is placed inside a vids */ - if (!caps || fourcc != GST_MAKE_FOURCC ('D', 'X', 'S', 'B')) { + if (!caps || (fourcc != GST_MAKE_FOURCC ('D', 'X', 'S', 'B') && + fourcc != GST_MAKE_FOURCC ('D', 'X', 'S', 'A'))) { padname = g_strdup_printf ("video_%u", avi->num_v_streams); templ = gst_element_class_get_pad_template (klass, "video_%u"); if (!caps) { @@ -2314,6 +2316,7 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf) templ = gst_element_class_get_pad_template (klass, "subpicture_%u"); tag_name = NULL; avi->num_sp_streams++; + sparse = TRUE; } break; } @@ -2353,6 +2356,7 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf) caps = gst_caps_new_empty_simple ("application/x-subtitle-avi"); tag_name = NULL; avi->num_t_streams++; + sparse = TRUE; break; } default: @@ -2431,6 +2435,8 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf) event = gst_event_new_stream_start (stream_id); if (avi->have_group_id) gst_event_set_group_id (event, avi->group_id); + if (sparse) + gst_event_set_stream_flags (event, GST_STREAM_FLAG_SPARSE); gst_pad_push_event (pad, event); g_free (stream_id); |