mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
resindvd: Don't send meaningless segment position downstream
Don't place a meaningless value in the position field in outgoing segments - values have to be in the range start->stop. https://bugzilla.gnome.org/show_bug.cgi?id=740558
This commit is contained in:
parent
1f670cb9ba
commit
52166768ed
1 changed files with 6 additions and 11 deletions
|
@ -942,22 +942,20 @@ gst_flups_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
demux->bytes_since_scr = 0;
|
demux->bytes_since_scr = 0;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (demux,
|
GST_DEBUG_OBJECT (demux,
|
||||||
"demux: received new segment start %" G_GINT64_FORMAT " stop %"
|
"demux: received new segment %" GST_SEGMENT_FORMAT,
|
||||||
G_GINT64_FORMAT " time %" G_GINT64_FORMAT
|
&demux->sink_segment);
|
||||||
" base %" G_GINT64_FORMAT, start, stop, time, base);
|
|
||||||
#if 0
|
#if 0
|
||||||
g_print ("demux: received new segment start %" G_GINT64_FORMAT " stop %"
|
g_print ("demux: received new segment start %" G_GINT64_FORMAT " stop %"
|
||||||
G_GINT64_FORMAT " time %" G_GINT64_FORMAT
|
G_GINT64_FORMAT " time %" G_GINT64_FORMAT
|
||||||
" base %" G_GINT64_FORMAT "\n", start, stop, time, base);
|
" base %" G_GINT64_FORMAT "\n", start, stop, time, base);
|
||||||
#endif
|
#endif
|
||||||
position = base - start;
|
adjust = base - start + SCR_MUNGE;
|
||||||
adjust = position + SCR_MUNGE;
|
|
||||||
if (adjust >= 0)
|
if (adjust >= 0)
|
||||||
demux->scr_adjust = GSTTIME_TO_MPEGTIME (adjust);
|
demux->scr_adjust = GSTTIME_TO_MPEGTIME (adjust);
|
||||||
else
|
else
|
||||||
demux->scr_adjust = -GSTTIME_TO_MPEGTIME (-adjust);
|
demux->scr_adjust = -GSTTIME_TO_MPEGTIME (-adjust);
|
||||||
|
|
||||||
start = SCR_MUNGE;
|
position = start = SCR_MUNGE;
|
||||||
base = 0;
|
base = 0;
|
||||||
|
|
||||||
if (stop != -1)
|
if (stop != -1)
|
||||||
|
@ -973,12 +971,9 @@ gst_flups_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||||
demux->src_segment.position = position;
|
demux->src_segment.position = position;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (demux,
|
GST_DEBUG_OBJECT (demux,
|
||||||
"sending new segment: rate %g format %d, start: %"
|
"sending new segment %" GST_SEGMENT_FORMAT
|
||||||
G_GINT64_FORMAT ", stop: %" G_GINT64_FORMAT ", time: %"
|
|
||||||
G_GINT64_FORMAT ", base: %" G_GINT64_FORMAT
|
|
||||||
", scr_adjust: %" G_GINT64_FORMAT "(%" GST_TIME_FORMAT ")",
|
", scr_adjust: %" G_GINT64_FORMAT "(%" GST_TIME_FORMAT ")",
|
||||||
segment->rate, segment->format, start, stop, time, base,
|
&demux->src_segment, demux->scr_adjust,
|
||||||
demux->scr_adjust,
|
|
||||||
GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->scr_adjust)));
|
GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->scr_adjust)));
|
||||||
#if 0
|
#if 0
|
||||||
g_print ("sending new segment: rate %g format %d, start: %"
|
g_print ("sending new segment: rate %g format %d, start: %"
|
||||||
|
|
Loading…
Reference in a new issue