Browse Source

ffmpeg: assert that audio packet duration in process_input_packet() is non negative

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.1
Michael Niedermayer 7 years ago
parent
commit
28d33c252e
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      fftools/ffmpeg.c

+ 1
- 0
fftools/ffmpeg.c View File

@@ -2710,6 +2710,7 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eo
ist->dts = ist->next_dts;
switch (ist->dec_ctx->codec_type) {
case AVMEDIA_TYPE_AUDIO:
av_assert1(pkt->duration >= 0);
if (ist->dec_ctx->sample_rate) {
ist->next_dts += ((int64_t)AV_TIME_BASE * ist->dec_ctx->frame_size) /
ist->dec_ctx->sample_rate;


Loading…
Cancel
Save