diff options
author | Michael Niedermayer | 2018-06-13 16:50:39 +0200 |
---|---|---|
committer | Michael Niedermayer | 2018-06-14 18:55:45 +0200 |
commit | 28d33c252ecaf1c4ce8a542eafb63a0836a2c6d2 (patch) | |
tree | bf25366204001a4ba2dc3d5ad67abee9b1d58203 /fftools | |
parent | 16d8b13b3b26c19d7f8856e039fe6662d96b4ff3 (diff) |
ffmpeg: assert that audio packet duration in process_input_packet() is non negative
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index ba8789a43c..50c2fa5d51 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -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; |