Fix T51153: Video duration is detected wrong after FFmpeg update

The issue was caused by stupid workaorund for libav. Now things works for
FFmpeg. There might need some tweaks needed for Libav, but that one is
not really priority for support.
This commit is contained in:
Sergey Sharybin 2017-05-12 16:43:36 +02:00
parent 37bc3850ce
commit 8ca9fa5fd3
Notes: blender-bot 2023-02-14 07:05:01 +01:00
Referenced by issue #51502, Cycles denoising: black bars and motion-blur like distortion w/ GPU rendering
Referenced by issue #51490, template system can lead to crash after reloading new file
Referenced by issue #51495, expose normal map color node problem
Referenced by issue #51153, VSE Interlaced Video FPS not being honored
1 changed files with 2 additions and 7 deletions

View File

@ -430,16 +430,11 @@ void av_frame_free(AVFrame **frame)
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
# if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 23, 1)
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 23, 1)
/* For until r_frame_rate was deprecated use it. */
return stream->r_frame_rate;
# else
#else
return stream->avg_frame_rate;
# endif
#endif
}