Commit 26d61e74 authored by Luca Ognibene's avatar Luca Ognibene

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
parent 78637215
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>
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);
}
if (pkt.flags & PKT_FLAG_KEY) {
if (pkt.flags & PKT_FLAG_KEY)
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));
}
......
......@@ -488,7 +488,9 @@ gst_ffmpegenc_chain_video (GstPad * pad, GstData * _data)
GST_BUFFER_SIZE (outbuf) = ret_size;
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (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_pad_push (ffmpegenc->srcpad, GST_DATA (outbuf));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment