mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-26 18:30:52 +08:00
normalize calls to ff_alloc_packet2
- check ret < 0 - remove excessive error log Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
c257fe1fde
commit
bcaf64b605
@@ -304,7 +304,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
/* write output if all frames for the packet have been encoded */
|
||||
if (s->pkt_frame_count == s->frames_per_packet) {
|
||||
s->pkt_frame_count = 0;
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, speex_bits_nbytes(&s->bits))))
|
||||
if ((ret = ff_alloc_packet2(avctx, avpkt, speex_bits_nbytes(&s->bits))) < 0)
|
||||
return ret;
|
||||
ret = speex_bits_write(&s->bits, avpkt->data, avpkt->size);
|
||||
speex_bits_reset(&s->bits);
|
||||
|
||||
Reference in New Issue
Block a user