Browse Source

avcodec/setts_bsf: Check timebase

Fixes: Division by 0
Fixes: 30952/clusterfuzz-testcase-minimized-ffmpeg_BSF_SETTS_fuzzer-6601016202100736

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7fc8ba9068)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.4
Michael Niedermayer 4 years ago
parent
commit
8c99a06c5c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/setts_bsf.c

+ 1
- 1
libavcodec/setts_bsf.c View File

@@ -152,7 +152,7 @@ static int setts_filter(AVBSFContext *ctx, AVPacket *pkt)
s->var_values[VAR_PREV_OUTDTS] = s->prev_outdts;
s->var_values[VAR_STARTPTS] = s->start_pts;
s->var_values[VAR_STARTDTS] = s->start_dts;
s->var_values[VAR_TB] = av_q2d(ctx->time_base_out);
s->var_values[VAR_TB] = ctx->time_base_out.den ? av_q2d(ctx->time_base_out) : 0;
s->var_values[VAR_SR] = ctx->par_in->sample_rate;

new_ts = llrint(av_expr_eval(s->ts_expr, s->var_values, NULL));


Loading…
Cancel
Save