summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-22 04:22:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-22 19:03:18 +0100
commited45636e16eb97220b7b61690a95507dca8481ca (patch)
treef76cac7963e3108979aa793a4a68695b2a182c9c /libavcodec
parent8f80e5fbeaca2f81259ce65f64cc238638bb5aa0 (diff)
ffv1enc: switch to ff_alloc_packet2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ffv1.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 95beddf283..f371c37676 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;
}