mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
roqvideoenc: switch to ff_alloc_packet2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
57c52663b6
commit
6c775606d1
@ -1020,8 +1020,7 @@ static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
/* 138 bits max per 8x8 block +
|
||||
* 256 codebooks*(6 bytes 2x2 + 4 bytes 4x4) + 8 bytes frame header */
|
||||
size = ((enc->width * enc->height / 64) * 138 + 7) / 8 + 256 * (6 + 4) + 8;
|
||||
if ((ret = ff_alloc_packet(pkt, size)) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Error getting output packet with size %d.\n", size);
|
||||
if ((ret = ff_alloc_packet2(avctx, pkt, size)) < 0) {
|
||||
return ret;
|
||||
}
|
||||
enc->out_buf = pkt->data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user