Fix T38455: Blenderplayer is not working
[blender.git] / intern / ffmpeg / ffmpeg_compat.h
index 6cae957471d954d37e1d02ef6c1c3f91feb745cf..801ab6e659d8f6131a52df512f4f3d64c3eeea7c 100644 (file)
@@ -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