[FFmpeg-cvslog] ffv1enc: switch to ff_alloc_packet2()

Michael Niedermayer git at videolan.org
Thu Mar 22 19:10:25 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 22 04:22:49 2012 +0100| [ed45636e16eb97220b7b61690a95507dca8481ca] | committer: Michael Niedermayer

ffv1enc: switch to ff_alloc_packet2()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/ffv1.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 95beddf..f371c37 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -26,6 +26,7 @@
  */
 
 #include "avcodec.h"
+#include "internal.h"
 #include "get_bits.h"
 #include "put_bits.h"
 #include "dsputil.h"
@@ -1153,10 +1154,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     uint8_t *buf_p;
     int i, ret;
 
-    if (!pkt->data &&
-        (ret = av_new_packet(pkt, avctx->width*avctx->height*((8*2+1+1)*4)/8
+    if ((ret = ff_alloc_packet2(avctx, pkt, avctx->width*avctx->height*((8*2+1+1)*4)/8
                                   + FF_MIN_BUFFER_SIZE)) < 0) {
-        av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n");
         return ret;
     }
 



More information about the ffmpeg-cvslog mailing list