Browse Source

ffprobe: don't use AVStream.codec to set decoder framerate

Also don't set time_base. It's deprecated for decoding and avcodec_open2()
will overwrite it

Reviewed-by: Josh de Kock <josh@itanimul.li>
Signed-off-by: James Almer <jamrial@gmail.com>
tags/n3.2
James Almer 8 years ago
parent
commit
92de2c23a6
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      ffprobe.c

+ 1
- 4
ffprobe.c View File

@@ -2612,10 +2612,7 @@ static int open_input_file(InputFile *ifile, const char *filename)
exit(1);

av_codec_set_pkt_timebase(ist->dec_ctx, stream->time_base);
#if FF_API_LAVF_AVCTX
ist->dec_ctx->time_base = stream->codec->time_base;
ist->dec_ctx->framerate = stream->codec->framerate;
#endif
ist->dec_ctx->framerate = stream->avg_frame_rate;

if (avcodec_open2(ist->dec_ctx, codec, &opts) < 0) {
av_log(NULL, AV_LOG_WARNING, "Could not open codec for input stream %d\n",


Loading…
Cancel
Save