ext/ffmpeg/gstffmpegenc.c: Fix the encoders by actually copying the encoded output data from the working area into th...

Original commit message from CVS:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_chain_video),
(gst_ffmpegenc_flush_buffers):
Fix the encoders by actually copying the encoded output data from the
working area into the output buffer.
Fixes: #453135.
This commit is contained in:
Jan Schmidt 2007-07-05 11:19:21 +00:00
parent b0aa56c796
commit 5f02c0eb85
3 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2007-07-05 Jan Schmidt <thaytan@mad.scientist.com>
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_chain_video),
(gst_ffmpegenc_flush_buffers):
Fix the encoders by actually copying the encoded output data from the
working area into the output buffer.
Fixes: #453135.
2007-06-22 Jan Schmidt <thaytan@mad.scientist.com>
* ext/ffmpeg/gstffmpegenc.c: (ffmpegenc_setup_working_buf),

2
common

@ -1 +1 @@
Subproject commit 14c5a68981278f642e4ca5fd5ca08554fc78b348
Subproject commit 5167bced491ffe62251c62d6c5e7b9a7541e97e5

View file

@ -634,6 +634,7 @@ gst_ffmpegenc_chain_video (GstPad * pad, GstBuffer * inbuf)
GST_ERROR_SYSTEM);
outbuf = gst_buffer_new_and_alloc (ret_size);
memcpy (GST_BUFFER_DATA (outbuf), ffmpegenc->working_buf, 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)
@ -778,6 +779,7 @@ gst_ffmpegenc_flush_buffers (GstFFMpegEnc * ffmpegenc, gboolean send)
inbuf = g_queue_pop_head (ffmpegenc->delay);
outbuf = gst_buffer_new_and_alloc (ret_size);
memcpy (GST_BUFFER_DATA (outbuf), ffmpegenc->working_buf, ret_size);
GST_BUFFER_TIMESTAMP (outbuf) = GST_BUFFER_TIMESTAMP (inbuf);
GST_BUFFER_DURATION (outbuf) = GST_BUFFER_DURATION (inbuf);