mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/rawenc: Use ff_alloc_packet2()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
11d923d414
commit
77fb14f039
|
@ -54,7 +54,7 @@ static int raw_encode(AVCodecContext *avctx, AVPacket *pkt,
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if ((ret = ff_alloc_packet(pkt, ret)) < 0)
|
if ((ret = ff_alloc_packet2(avctx, pkt, ret, ret)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
if ((ret = avpicture_layout((const AVPicture *)frame, avctx->pix_fmt, avctx->width,
|
if ((ret = avpicture_layout((const AVPicture *)frame, avctx->pix_fmt, avctx->width,
|
||||||
avctx->height, pkt->data, pkt->size)) < 0)
|
avctx->height, pkt->data, pkt->size)) < 0)
|
||||||
|
|
Loading…
Reference in New Issue