diff options
Diffstat (limited to 'gst/mxf')
-rw-r--r-- | gst/mxf/mxfdemux.c | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index cf5201a0b..119a7d671 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -3643,6 +3643,31 @@ gst_mxf_demux_src_query (GstPad * pad, GstObject * parent, GstQuery * query) break; } + case GST_QUERY_SEGMENT:{ + GstFormat format; + gint64 start, stop; + + format = demux->segment.format; + + start = + gst_segment_to_stream_time (&demux->segment, format, + demux->segment.start); + if ((stop = demux->segment.stop) == -1) + stop = demux->segment.duration; + else + stop = gst_segment_to_stream_time (&demux->segment, format, stop); + + if (demux->segment.rate < 0.0) { + gint64 tmp; + tmp = stop; + stop = start; + start = tmp; + } + + gst_query_set_segment (query, demux->segment.rate, format, start, stop); + ret = TRUE; + break; + } default: ret = gst_pad_query_default (pad, parent, query); break; @@ -3916,6 +3941,31 @@ gst_mxf_demux_query (GstElement * element, GstQuery * query) break; } + case GST_QUERY_SEGMENT:{ + GstFormat format; + gint64 start, stop; + + format = demux->segment.format; + + start = + gst_segment_to_stream_time (&demux->segment, format, + demux->segment.start); + if ((stop = demux->segment.stop) == -1) + stop = demux->segment.duration; + else + stop = gst_segment_to_stream_time (&demux->segment, format, stop); + + if (demux->segment.rate < 0.0) { + gint64 tmp; + tmp = stop; + stop = start; + start = tmp; + } + + gst_query_set_segment (query, demux->segment.rate, format, start, stop); + ret = TRUE; + break; + } default: /* else forward upstream */ ret = gst_pad_peer_query (demux->sinkpad, query); |