mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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.
This commit is contained in:
parent
bc761c94c7
commit
cdb905efe0
1 changed files with 8 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue