Commit 35bb7be7 authored by Ronald S. Bultje's avatar Ronald S. Bultje

ext/ffmpeg/gstffmpegenc.c: Fix crash on randomly sized input (#169082).

Original commit message from CVS:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_chain_video):
Fix crash on randomly sized input (#169082).
parent 64faa1ce
2005-03-13 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_chain_video):
Fix crash on randomly sized input (#169082).
2005-03-11 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* configure.ac:
......
common @ 131c2632
Subproject commit b2638c100721f67b280c3b43b21f1ce1c9b5e316
Subproject commit 131c2632127e6f061b5270d8f80651782a4fdd13
......@@ -459,19 +459,19 @@ gst_ffmpegenc_chain_video (GstPad * pad, GstData * _data)
GstBuffer *inbuf = GST_BUFFER (_data), *outbuf;
GstFFMpegEncClass *oclass =
(GstFFMpegEncClass *) (G_OBJECT_GET_CLASS (ffmpegenc));
gint ret_size = 0;
gint ret_size = 0, frame_size;
/* FIXME: events (discont (flush!) and eos (close down) etc.) */
outbuf = gst_buffer_new_and_alloc (ffmpegenc->buffer_size);
gst_ffmpeg_avpicture_fill ((AVPicture *) ffmpegenc->picture,
frame_size = gst_ffmpeg_avpicture_fill ((AVPicture *) ffmpegenc->picture,
GST_BUFFER_DATA (inbuf),
ffmpegenc->context->pix_fmt,
ffmpegenc->context->width, ffmpegenc->context->height);
g_return_if_fail (frame_size == GST_BUFFER_SIZE (inbuf));
ffmpegenc->picture->pts = GST_BUFFER_TIMESTAMP (inbuf) / 1000;
outbuf = gst_buffer_new_and_alloc (ffmpegenc->buffer_size);
ret_size = avcodec_encode_video (ffmpegenc->context,
GST_BUFFER_DATA (outbuf),
GST_BUFFER_MAXSIZE (outbuf), ffmpegenc->picture);
......
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