[FFmpeg-cvslog] libxvidff: switch to ff_alloc_packet2().
Michael Niedermayer
git at videolan.org
Thu Mar 22 19:10:31 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 22 15:00:48 2012 +0100| [fcd8a3c8c23a5df8d3b425ccb11a8a424904bd2e] | committer: Michael Niedermayer
libxvidff: 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=fcd8a3c8c23a5df8d3b425ccb11a8a424904bd2e
---
libavcodec/libxvidff.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index a77fafc..158430d 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list