]> git.sesse.net Git - ffmpeg/commitdiff
libxvidff: switch to ff_alloc_packet2().
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 22 Mar 2012 14:00:48 +0000 (15:00 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 22 Mar 2012 18:03:21 +0000 (19:03 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/libxvidff.c

index a77fafc7ecd8fd52614261c3d66bc80e191531da..158430d05e722b4e75ddcd2fa10e03e389b1428d 100644 (file)
@@ -28,6 +28,7 @@
 #include <xvid.h>
 #include <unistd.h>
 #include "avcodec.h"
+#include "internal.h"
 #include "libavutil/file.h"
 #include "libavutil/cpu.h"
 #include "libavutil/intreadwrite.h"
@@ -384,9 +385,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     xvid_enc_frame_t xvid_enc_frame;
     xvid_enc_stats_t xvid_enc_stats;
 
-    if (!user_packet &&
-        (ret = av_new_packet(pkt, mb_width*mb_height*MAX_MB_BYTES + FF_MIN_BUFFER_SIZE)) < 0) {
-        av_log(avctx, AV_LOG_ERROR, "Error getting output packet.\n");
+    if ((ret = ff_alloc_packet2(avctx, pkt, mb_width*mb_height*MAX_MB_BYTES + FF_MIN_BUFFER_SIZE)) < 0) {
         return ret;
     }