summaryrefslogtreecommitdiff
path: root/ffprobe.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-09-26 22:56:52 -0300
committerJames Almer <jamrial@gmail.com>2016-09-27 21:21:42 -0300
commit92de2c23a61e5a8d8ced28b4697cae395f35e46c (patch)
tree9da09094e68f3d221ad66010e635a8d311eaa44a /ffprobe.c
parent29b6c2be291eaa604a409daf7fd8cc4fb8a762cb (diff)
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>
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ffprobe.c b/ffprobe.c
index b59f11e4f7..bb3979c98b 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -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",