summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-09-21 18:09:12 +0200
committerWim Taymans <wim@metal.(none)>2009-09-21 18:10:12 +0200
commit10eb1a0ff4c81ffdfcd3e103e5d4bb3fbeb24d1b (patch)
tree5e5d4b293e5dad5983bec9b20960baf012a590ef
parent253f43203d6b7c76f69ba3b26c6d91cf30195686 (diff)
avi: fix timestamps in push mode
-rw-r--r--gst/avi/gstavidemux.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index 3a7325313..0f6389356 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -4322,8 +4322,6 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
stream->delay = next_ts;
*/
- stream->current_frame++;
- stream->current_byte += size;
/* parsing of corresponding header may have failed */
if (G_UNLIKELY (!stream->pad)) {
@@ -4338,6 +4336,9 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
if (G_UNLIKELY (format != GST_FORMAT_TIME))
goto wrong_format;
+ stream->current_frame++;
+ stream->current_byte += size;
+
/* invert the picture if needed */
buf = gst_avi_demux_invert (stream, buf);
@@ -4354,10 +4355,11 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
gst_buffer_set_caps (buf, GST_PAD_CAPS (stream->pad));
GST_DEBUG_OBJECT (avi,
- "Pushing buffer with time=%" GST_TIME_FORMAT
- ", offset %" G_GUINT64_FORMAT " and size %d over pad %s",
- GST_TIME_ARGS (next_ts), GST_BUFFER_OFFSET (buf), size,
- GST_PAD_NAME (stream->pad));
+ "Pushing buffer with time=%" GST_TIME_FORMAT ", duration %"
+ GST_TIME_FORMAT ", offset %" G_GUINT64_FORMAT
+ " and size %d over pad %s", GST_TIME_ARGS (next_ts),
+ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_BUFFER_OFFSET (buf),
+ size, GST_PAD_NAME (stream->pad));
/* update current position in the segment */
gst_segment_set_last_stop (&avi->segment, GST_FORMAT_TIME, next_ts);