Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-01-23 19:15:56 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-01-23 19:16:17 +0300
commit9770d071ff4306ccec940d1f44169297bb3f5747 (patch)
treeca306ce55675d534bfbf22b1ea279209d085d525 /intern/ffmpeg/ffmpeg_compat.h
parent7a9e4e41a924a1dacb120263ca7181fe69b6a397 (diff)
Fix T54834: VSE can't import OGG Theora video
Diffstat (limited to 'intern/ffmpeg/ffmpeg_compat.h')
-rw-r--r--intern/ffmpeg/ffmpeg_compat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
index bc65f19ef59..47d20113190 100644
--- a/intern/ffmpeg/ffmpeg_compat.h
+++ b/intern/ffmpeg/ffmpeg_compat.h
@@ -520,6 +520,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
}