[FFmpeg-cvslog] nellymoserenc: set AVCodecContext.coded_frame

Justin Ruggles git at videolan.org
Sun Feb 26 05:21:47 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Tue Feb 21 18:47:50 2012 -0500| [928672f1f193167a5876cd5e00c904d4f6b52b4a] | committer: Justin Ruggles

nellymoserenc: set AVCodecContext.coded_frame

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=928672f1f193167a5876cd5e00c904d4f6b52b4a
---

 libavcodec/nellymoserenc.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index 4f351da..e60b0b5 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -137,6 +137,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
         av_free(s->opt);
         av_free(s->path);
     }
+    av_freep(&avctx->coded_frame);
 
     return 0;
 }
@@ -179,6 +180,12 @@ static av_cold int encode_init(AVCodecContext *avctx)
         }
     }
 
+    avctx->coded_frame = avcodec_alloc_frame();
+    if (!avctx->coded_frame) {
+        ret = AVERROR(ENOMEM);
+        goto error;
+    }
+
     return 0;
 error:
     encode_end(avctx);



More information about the ffmpeg-cvslog mailing list