mpegvideo_enc: : switch to ff_alloc_packet2()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-03-22 04:25:31 +01:00
parent 620559e37b
commit e22113cf1d

View File

@ -1435,8 +1435,7 @@ int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
/* output? */ /* output? */
if (s->new_picture.f.data[0]) { if (s->new_picture.f.data[0]) {
if (!pkt->data && if ((ret = ff_alloc_packet2(avctx, pkt, s->mb_width*s->mb_height*(MAX_MB_BYTES+100)+10000)) < 0)
(ret = ff_alloc_packet(pkt, s->mb_width*s->mb_height*(MAX_MB_BYTES+100)+10000)) < 0)
return ret; return ret;
if (s->mb_info) { if (s->mb_info) {
s->mb_info_ptr = av_packet_new_side_data(pkt, s->mb_info_ptr = av_packet_new_side_data(pkt,