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

@@ -354,7 +354,11 @@ transcode_setup(struct media_file_info *mfi, off_t *est_size, int wavhdr)
}
memset(ctx, 0, sizeof(struct transcode_ctx));
#if LIBAVFORMAT_VERSION_MAJOR >= 53 || (LIBAVFORMAT_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 3)
ret = avformat_open_input(&ctx->fmtctx, mfi->path, NULL, NULL);
#else
ret = av_open_input_file(&ctx->fmtctx, mfi->path, NULL, 0, NULL);
#endif
if (ret != 0)
{
DPRINTF(E_WARN, L_XCODE, "Could not open file %s: %s\n", mfi->fname, strerror(AVUNERROR(ret)));