mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
ffmpeg: assert that audio packet duration in process_input_packet() is non negative
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
16d8b13b3b
commit
28d33c252e
@ -2710,6 +2710,7 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
|
|||||||
ist->dts = ist->next_dts;
|
ist->dts = ist->next_dts;
|
||||||
switch (ist->dec_ctx->codec_type) {
|
switch (ist->dec_ctx->codec_type) {
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
|
av_assert1(pkt->duration >= 0);
|
||||||
if (ist->dec_ctx->sample_rate) {
|
if (ist->dec_ctx->sample_rate) {
|
||||||
ist->next_dts += ((int64_t)AV_TIME_BASE * ist->dec_ctx->frame_size) /
|
ist->next_dts += ((int64_t)AV_TIME_BASE * ist->dec_ctx->frame_size) /
|
||||||
ist->dec_ctx->sample_rate;
|
ist->dec_ctx->sample_rate;
|
||||||
|
Loading…
Reference in New Issue
Block a user