Commit fcd8a3c8 authored by Michael Niedermayer's avatar Michael Niedermayer

libxvidff: switch to ff_alloc_packet2().

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d2971912
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <xvid.h> #include <xvid.h>
#include <unistd.h> #include <unistd.h>
#include "avcodec.h" #include "avcodec.h"
#include "internal.h"
#include "libavutil/file.h" #include "libavutil/file.h"
#include "libavutil/cpu.h" #include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h" #include "libavutil/intreadwrite.h"
...@@ -384,9 +385,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -384,9 +385,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
xvid_enc_frame_t xvid_enc_frame; xvid_enc_frame_t xvid_enc_frame;
xvid_enc_stats_t xvid_enc_stats; xvid_enc_stats_t xvid_enc_stats;
if (!user_packet && if ((ret = ff_alloc_packet2(avctx, pkt, mb_width*mb_height*MAX_MB_BYTES + FF_MIN_BUFFER_SIZE)) < 0) {
(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");
return ret; return ret;
} }
......
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