diff options
Diffstat (limited to 'source/blender/imbuf/intern/util.c')
-rw-r--r-- | source/blender/imbuf/intern/util.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 3e4136cbef9..6db8dcc06cf 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -63,11 +63,7 @@ #include <libavdevice/avdevice.h> #include <libavutil/log.h> -#if LIBAVFORMAT_VERSION_INT < (49 << 16) -#define FFMPEG_OLD_FRAME_RATE 1 -#else -#define FFMPEG_CODEC_IS_POINTER 1 -#endif +#include "ffmpeg_compat.h" #endif @@ -117,6 +113,7 @@ const char *imb_ext_movie[] = { ".m4v", ".m2v", ".m2t", + ".m2ts", ".mts", ".mv", ".avs", @@ -146,6 +143,9 @@ const char *imb_ext_audio[] = { ".flac", ".wma", ".eac3", + ".aif", + ".aiff", + ".m4a", NULL}; static int IMB_ispic_name(const char *name) @@ -241,19 +241,6 @@ void do_init_ffmpeg(void) } } -#ifdef FFMPEG_CODEC_IS_POINTER -static AVCodecContext* get_codec_from_stream(AVStream* stream) -{ - return stream->codec; -} -#else -static AVCodecContext* get_codec_from_stream(AVStream* stream) -{ - return &stream->codec; -} -#endif - - static int isffmpeg (const char *filename) { AVFormatContext *pFormatCtx; unsigned int i; @@ -284,15 +271,15 @@ static int isffmpeg (const char *filename) { return 0; } - if(UTIL_DEBUG) dump_format(pFormatCtx, 0, filename, 0); + if(UTIL_DEBUG) av_dump_format(pFormatCtx, 0, filename, 0); /* Find the first video stream */ videoStream=-1; for(i=0; i<pFormatCtx->nb_streams; i++) if(pFormatCtx->streams[i] && - get_codec_from_stream(pFormatCtx->streams[i]) && - (get_codec_from_stream(pFormatCtx->streams[i])->codec_type==CODEC_TYPE_VIDEO)) + pFormatCtx->streams[i]->codec && + (pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO)) { videoStream=i; break; @@ -303,7 +290,7 @@ static int isffmpeg (const char *filename) { return 0; } - pCodecCtx = get_codec_from_stream(pFormatCtx->streams[videoStream]); + pCodecCtx = pFormatCtx->streams[videoStream]->codec; /* Find the decoder for the video stream */ pCodec=avcodec_find_decoder(pCodecCtx->codec_id); |