mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-15 19:40:07 +01:00
avcodec: set avpkt->size to 0 if encode2() did not output a packet
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user