mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
ext/ffmpeg/: more DELTA_UNIT / KEY_UNIT fixes
Original commit message from CVS: * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop): * ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_chain_video): more DELTA_UNIT / KEY_UNIT fixes
This commit is contained in:
parent
78637215f1
commit
26d61e741b
3 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2005-06-27 Daniel Fischer <dan@f3c.com>
|
||||||
|
|
||||||
|
reviewed by: Luca Ognibene <luogni@tin.it>
|
||||||
|
|
||||||
|
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop):
|
||||||
|
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_chain_video):
|
||||||
|
more DELTA_UNIT / KEY_UNIT fixes
|
||||||
|
|
||||||
2005-06-27 Daniel Fischer <dan@f3c.com>
|
2005-06-27 Daniel Fischer <dan@f3c.com>
|
||||||
|
|
||||||
reviewed by: Luca Ognibene <luogni@tin.it>
|
reviewed by: Luca Ognibene <luogni@tin.it>
|
||||||
|
|
|
@ -661,9 +661,10 @@ gst_ffmpegdemux_loop (GstElement * element)
|
||||||
demux->last_ts[stream->index] = GST_BUFFER_TIMESTAMP (outbuf);
|
demux->last_ts[stream->index] = GST_BUFFER_TIMESTAMP (outbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pkt.flags & PKT_FLAG_KEY) {
|
if (pkt.flags & PKT_FLAG_KEY)
|
||||||
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_KEY_UNIT);
|
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_KEY_UNIT);
|
||||||
}
|
else
|
||||||
|
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_DELTA_UNIT);
|
||||||
|
|
||||||
gst_pad_push (pad, GST_DATA (outbuf));
|
gst_pad_push (pad, GST_DATA (outbuf));
|
||||||
}
|
}
|
||||||
|
|
|
@ -488,7 +488,9 @@ gst_ffmpegenc_chain_video (GstPad * pad, GstData * _data)
|
||||||
GST_BUFFER_SIZE (outbuf) = ret_size;
|
GST_BUFFER_SIZE (outbuf) = ret_size;
|
||||||
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (inbuf);
|
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (inbuf);
|
||||||
GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (inbuf);
|
GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (inbuf);
|
||||||
if (ffmpegenc->context->coded_frame->key_frame == 0)
|
if (ffmpegenc->context->coded_frame->key_frame)
|
||||||
|
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_KEY_UNIT);
|
||||||
|
else
|
||||||
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_DELTA_UNIT);
|
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_DELTA_UNIT);
|
||||||
gst_pad_push (ffmpegenc->srcpad, GST_DATA (outbuf));
|
gst_pad_push (ffmpegenc->srcpad, GST_DATA (outbuf));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue