[FFmpeg-devel] [PATCH] Fixes frame allocation and avoids a bad write when using FFV1 as codec

Andre Anjos andre.dos.anjos at gmail.com
Tue Oct 29 11:28:26 CET 2013


From: Andre Anjos <andre.anjos at idiap.ch>

---
 doc/examples/muxing.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index a8f979f..188ceb3 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -311,6 +311,9 @@ static void open_video(AVFormatContext *oc, AVCodec *codec, AVStream *st)
 
     /* allocate and init a re-usable frame */
     frame = avcodec_alloc_frame();
+    frame->format = c->pix_fmt;
+    frame->width = c->width;
+    frame->height = c->height;
     if (!frame) {
         fprintf(stderr, "Could not allocate video frame\n");
         exit(1);
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list