Merge pull request #140 from darealshinji/patch-1

use av_frame_alloc() if lavc is >= 55.28.1
This commit is contained in:
Robert Beckebans 2014-07-21 10:04:12 +02:00
commit f5dd0611d5

View file

@ -386,8 +386,13 @@ idCinematicLocal::idCinematicLocal()
// Carl: ffmpeg stuff, for bink and normal video files: // Carl: ffmpeg stuff, for bink and normal video files:
isRoQ = false; isRoQ = false;
// fmt_ctx = avformat_alloc_context(); // fmt_ctx = avformat_alloc_context();
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)
frame = av_frame_alloc();
frame2 = av_frame_alloc();
#else
frame = avcodec_alloc_frame(); frame = avcodec_alloc_frame();
frame2 = avcodec_alloc_frame(); frame2 = avcodec_alloc_frame();
#endif // LIBAVCODEC_VERSION_INT
dec_ctx = NULL; dec_ctx = NULL;
fmt_ctx = NULL; fmt_ctx = NULL;
video_stream_index = -1; video_stream_index = -1;