Commit 076310ed authored by Michael Niedermayer's avatar Michael Niedermayer

snowenc: switch to ff_alloc_packet2()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6eaa31cb
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "libavutil/log.h" #include "libavutil/log.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "avcodec.h" #include "avcodec.h"
#include "internal.h"
#include "dsputil.h" #include "dsputil.h"
#include "dwt.h" #include "dwt.h"
#include "snow.h" #include "snow.h"
...@@ -1613,9 +1614,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, ...@@ -1613,9 +1614,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
uint8_t rc_header_bak[sizeof(s->header_state)]; uint8_t rc_header_bak[sizeof(s->header_state)];
uint8_t rc_block_bak[sizeof(s->block_state)]; uint8_t rc_block_bak[sizeof(s->block_state)];
if (!pkt->data && if ((ret = ff_alloc_packet2(avctx, pkt, s->b_width*s->b_height*MB_SIZE*MB_SIZE*3 + FF_MIN_BUFFER_SIZE)) < 0) {
(ret = av_new_packet(pkt, s->b_width*s->b_height*MB_SIZE*MB_SIZE*3 + 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