diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-12-04 13:50:59 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-12-04 13:52:49 +0100 |
commit | ee6d7fd2db111d78d703178f7b43410a486d36fd (patch) | |
tree | 58e76ec422d48ffe1ef09121bafe66547dafb8ff | |
parent | 24b93d82ec468b94a56d9019143ee472477ac372 (diff) |
avidemux: init current_entry in push mode
Set the current_entry to 0 (instead of -1) in push mode so that we correctly
calculate the current frame number and timestamp.
Add some more debug info and fic the duration debug.
-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 286a121dc..f9bb7c155 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -2816,6 +2816,7 @@ gst_avi_demux_stream_header_push (GstAviDemux * avi) GstBuffer *buf = NULL, *sub = NULL; guint offset = 4; gint64 stop; + gint i; GST_DEBUG ("Reading and parsing avi headers: %d", avi->header_state); @@ -3001,6 +3002,10 @@ skipping_done: gst_avi_demux_expose_streams (avi, TRUE); + /* prepare all streams for index 0 */ + for (i = 0; i < avi->num_streams; i++) + avi->stream[i].current_entry = 0; + /* create initial NEWSEGMENT event */ if ((stop = avi->segment.stop) == GST_CLOCK_TIME_NONE) stop = avi->segment.duration; @@ -4345,7 +4350,7 @@ gst_avi_demux_stream_data (GstAviDemux * avi) "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), + GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_OFFSET (buf), size, GST_PAD_NAME (stream->pad)); /* update current position in the segment */ @@ -4353,6 +4358,7 @@ gst_avi_demux_stream_data (GstAviDemux * avi) /* mark discont when pending */ if (G_UNLIKELY (stream->discont)) { + GST_DEBUG_OBJECT (avi, "Setting DISCONT"); GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); stream->discont = FALSE; } |