libav 0.7: use avformat_open_input() instead of av_open_input_file()

This commit is contained in:
Julien BLACHE
2011-09-10 12:04:01 +02:00
parent 29fe36522d
commit dbe22c2c02
3 changed files with 16 additions and 0 deletions

View File

@@ -311,7 +311,13 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
int i;
int ret;
ctx = NULL;
#if LIBAVFORMAT_VERSION_MAJOR >= 53 || (LIBAVFORMAT_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 3)
ret = avformat_open_input(&ctx, file, NULL, NULL);
#else
ret = av_open_input_file(&ctx, file, NULL, 0, NULL);
#endif
if (ret != 0)
{
DPRINTF(E_WARN, L_SCAN, "Cannot open media file '%s': %s\n", file, strerror(AVUNERROR(ret)));