gst-plugins-good: avidemux: avi only knows about DTS

Wim Taymans wtay at kemper.freedesktop.org
Tue Apr 3 02:53:25 PDT 2012


Module: gst-plugins-good
Branch: master
Commit: cdb905efe09b0ef9ccc03472820e33c972f94a76
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=cdb905efe09b0ef9ccc03472820e33c972f94a76

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Tue Apr  3 11:50:00 2012 +0200

avidemux: avi only knows about DTS

Only set DTS on outgoing buffers unless we have a keyframe and then we can set
the PTS to DTS as well.

---

 gst/avi/gstavidemux.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c
index 8b27cde..eaa4bfd 100644
--- a/gst/avi/gstavidemux.c
+++ b/gst/avi/gstavidemux.c
@@ -4724,12 +4724,14 @@ gst_avi_demux_loop_data (GstAviDemux * avi)
     buf = gst_avi_demux_invert (stream, buf);
 
     /* mark non-keyframes */
-    if (keyframe)
+    if (keyframe) {
       GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
-    else
+      GST_BUFFER_PTS (buf) = timestamp;
+    } else {
       GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
-
-    GST_BUFFER_TIMESTAMP (buf) = timestamp;
+      GST_BUFFER_PTS (buf) = GST_CLOCK_TIME_NONE;
+    }
+    GST_BUFFER_DTS (buf) = timestamp;
     GST_BUFFER_DURATION (buf) = duration;
     GST_BUFFER_OFFSET (buf) = out_offset;
     GST_BUFFER_OFFSET_END (buf) = out_offset_end;
@@ -5005,7 +5007,8 @@ gst_avi_demux_stream_data (GstAviDemux * avi)
           gst_pad_query_position (stream->pad, GST_FORMAT_TIME,
               (gint64 *) & dur_ts);
 
-          GST_BUFFER_TIMESTAMP (buf) = next_ts;
+          GST_BUFFER_DTS (buf) = next_ts;
+          GST_BUFFER_PTS (buf) = GST_CLOCK_TIME_NONE;
           GST_BUFFER_DURATION (buf) = dur_ts - next_ts;
           if (stream->strh->type == GST_RIFF_FCC_vids) {
             GST_BUFFER_OFFSET (buf) = stream->current_entry - 1;



More information about the gstreamer-commits mailing list