diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-09-13 21:29:12 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-09-13 21:29:12 +0300 |
commit | 7518d30f2a4b1db3e35e1cad3680dc50474ef46c (patch) | |
tree | 47d96f2a8db23e4321f3adb9e490fae584f49542 /source/blender/imbuf/intern | |
parent | 3302b7e6a3768f04ef545634ee18a3280dfe8f62 (diff) |
Fix T100771: Incorrect strip length when timecodes are used
Some files have 2 different framerates stored in metadata. Use function
`av_guess_frame_rate` to get media FPS, because it provides more
consistent / correct values across multiple files.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D15839
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/indexer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index 00396c01d99..a4f1f5e813a 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -1012,7 +1012,7 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context, stream_size = avio_size(context->iFormatCtx->pb); - context->frame_rate = av_q2d(context->iStream->r_frame_rate); + context->frame_rate = av_q2d(av_guess_frame_rate(context->iFormatCtx, context->iStream, NULL)); context->pts_time_base = av_q2d(context->iStream->time_base); while (av_read_frame(context->iFormatCtx, next_packet) >= 0) { |