1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec: set avpkt->size to 0 if encode2() did not output a packet

This commit is contained in:
Justin Ruggles 2012-02-07 14:31:49 -05:00
parent a75bc764ec
commit b758cf7343

View File

@ -881,6 +881,8 @@ int attribute_align_arg avcodec_encode_audio2(AVCodecContext *avctx,
avctx->time_base); avctx->time_base);
} }
avpkt->dts = avpkt->pts; avpkt->dts = avpkt->pts;
} else {
avpkt->size = 0;
} }
} else { } else {
/* for compatibility with encoders not supporting encode2(), we need to /* for compatibility with encoders not supporting encode2(), we need to