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:
Diffstat (limited to 'intern/ffmpeg')
-rw-r--r--intern/ffmpeg/ffmpeg_compat.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
index 6cae957471d..801ab6e659d 100644
--- a/intern/ffmpeg/ffmpeg_compat.h
+++ b/intern/ffmpeg/ffmpeg_compat.h
@@ -419,4 +419,15 @@ void av_frame_free(AVFrame **frame)
}
#endif
+FFMPEG_INLINE
+AVRational av_get_r_frame_rate_compat(const AVStream *stream)
+{
+ /* Stupid way to distinguish FFmpeg from Libav. */
+#if LIBAVCODEC_VERSION_MICRO >= 100
+ return stream->r_frame_rate;
+#else
+ return stream->avg_frame_rate;
+#endif
+}
+
#endif