summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <jan@centricular.com>2015-02-08 04:51:13 +1100
committerWim Taymans <wtaymans@redhat.com>2015-06-15 10:04:35 +0200
commit69e004344a74a7bd3ef7eac6812a696882d7af43 (patch)
tree041c4c2342da2f97163aae82d78a35286c8cf3a2
parentc86e234ca380ea8828d3708b608fbddd5320b03a (diff)
resindvd: Don't send meaningless segment position downstreamf22f21
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
-rw-r--r--ext/resindvd/gstmpegdemux.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/ext/resindvd/gstmpegdemux.c b/ext/resindvd/gstmpegdemux.c
index fcf9d759e..7753514ba 100644
--- a/ext/resindvd/gstmpegdemux.c
+++ b/ext/resindvd/gstmpegdemux.c
@@ -942,22 +942,20 @@ gst_flups_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
demux->bytes_since_scr = 0;
GST_DEBUG_OBJECT (demux,
- "demux: received new segment start %" G_GINT64_FORMAT " stop %"
- G_GINT64_FORMAT " time %" G_GINT64_FORMAT
- " base %" G_GINT64_FORMAT, start, stop, time, base);
+ "demux: received new segment %" GST_SEGMENT_FORMAT,
+ &demux->sink_segment);
#if 0
g_print ("demux: received new segment start %" G_GINT64_FORMAT " stop %"
G_GINT64_FORMAT " time %" G_GINT64_FORMAT
" base %" G_GINT64_FORMAT "\n", start, stop, time, base);
#endif
- position = base - start;
- adjust = position + SCR_MUNGE;
+ adjust = base - start + SCR_MUNGE;
if (adjust >= 0)
demux->scr_adjust = GSTTIME_TO_MPEGTIME (adjust);
else
demux->scr_adjust = -GSTTIME_TO_MPEGTIME (-adjust);
- start = SCR_MUNGE;
+ position = start = SCR_MUNGE;
base = 0;
if (stop != -1)
@@ -973,12 +971,9 @@ gst_flups_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
demux->src_segment.position = position;
GST_DEBUG_OBJECT (demux,
- "sending new segment: rate %g format %d, start: %"
- G_GINT64_FORMAT ", stop: %" G_GINT64_FORMAT ", time: %"
- G_GINT64_FORMAT ", base: %" G_GINT64_FORMAT
+ "sending new segment %" GST_SEGMENT_FORMAT
", scr_adjust: %" G_GINT64_FORMAT "(%" GST_TIME_FORMAT ")",
- segment->rate, segment->format, start, stop, time, base,
- demux->scr_adjust,
+ &demux->src_segment, demux->scr_adjust,
GST_TIME_ARGS (MPEGTIME_TO_GSTTIME (demux->scr_adjust)));
#if 0
g_print ("sending new segment: rate %g format %d, start: %"