diff options
Diffstat (limited to 'intern/ffmpeg/ffmpeg_compat.h')
-rw-r--r-- | intern/ffmpeg/ffmpeg_compat.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h index 97501920712..a7e80490f1e 100644 --- a/intern/ffmpeg/ffmpeg_compat.h +++ b/intern/ffmpeg/ffmpeg_compat.h @@ -519,6 +519,14 @@ AVRational av_get_r_frame_rate_compat(AVFormatContext *ctx, /* For until r_frame_rate was deprecated use it. */ return stream->r_frame_rate; #else +# ifdef AV_USING_FFMPEG + /* Some of the videos might have average frame rate set to, while the + * r_frame_rate will show a correct value. This happens, for example, for + * OGG video files saved with Blender. */ + if (stream->avg_frame_rate.den == 0) { + return stream->r_frame_rate; + } +# endif return stream->avg_frame_rate; #endif } |