diff --git a/configure.ac b/configure.ac index 48cffcb..7685c54 100644 --- a/configure.ac +++ b/configure.ac @@ -381,17 +381,17 @@ for dir in "" /usr/local $SEARCH_DIR; do if test -n "$dir"; then LDFLAGS="$LDFLAGS -L$dir/lib" fi - AC_CHECK_LIB([avformat], [av_open_input_file], [LIBAVFORMAT_LIBS="-lavformat"], [unset ac_cv_lib_avformat_av_open_input_file; LDFLAGS="$LDFLAGS_SAVE"; continue]) + AC_CHECK_LIB([avformat], [avformat_open_input], [LIBAVFORMAT_LIBS="-lavformat"], [unset ac_cv_lib_avformat_avformat_open_input; LDFLAGS="$LDFLAGS_SAVE"; continue]) AC_SUBST(LIBJPEG_LIBS) break done -test x"$ac_cv_lib_avformat_av_open_input_file" = x"yes" || AC_MSG_ERROR([Could not find libavformat - part of ffmpeg]) +test x"$ac_cv_lib_avformat_avformat_open_input" = x"yes" || AC_MSG_ERROR([Could not find libavformat - part of ffmpeg]) AC_SUBST(LIBAVFORMAT_LIBS) AC_CHECK_LIB(avutil ,[av_rescale_q], [LIBAVUTIL_LIBS="-lavutil"], [AC_MSG_ERROR([Could not find libavutil - part of ffmpeg])]) AC_SUBST(LIBAVUTIL_LIBS) -AC_CHECK_LIB(avcodec ,[avcodec_init], [LIBAVCODEC_LIBS="-lavcodec"], [AC_MSG_ERROR([Could not find libavcodec - part of ffmpeg])]) +AC_CHECK_LIB(avcodec ,[avcodec_register], [LIBAVCODEC_LIBS="-lavcodec"], [AC_MSG_ERROR([Could not find libavcodec - part of ffmpeg])]) AC_SUBST(LIBAVCODEC_LIBS) AC_CHECK_LIB(pthread, pthread_create) diff --git a/metadata.c b/metadata.c index 2ebcaa8..6e80fcc 100644 --- a/metadata.c +++ b/metadata.c @@ -748,7 +748,7 @@ GetVideoMetadata(const char * path, char * name) DPRINTF(E_WARN, L_METADATA, "Opening %s failed!\n", path); return 0; } - av_find_stream_info(ctx); + avformat_find_stream_info(ctx, NULL); //dump_format(ctx, 0, NULL, 0); for( i=0; inb_streams; i++) { @@ -772,7 +772,7 @@ GetVideoMetadata(const char * path, char * name) if( !vc ) { /* This must not be a video file. */ - av_close_input_file(ctx); + avformat_close_input(&ctx); if( !is_audio(path) ) DPRINTF(E_DEBUG, L_METADATA, "File %s does not contain a video stream.\n", basepath); free(path_cpy); @@ -1555,10 +1555,10 @@ GetVideoMetadata(const char * path, char * name) { if( ctx->metadata ) { - AVMetadataTag *tag = NULL; + AVDictionaryEntry *tag = NULL; //DEBUG DPRINTF(E_DEBUG, L_METADATA, "Metadata:\n"); - while( (tag = av_metadata_get(ctx->metadata, "", tag, AV_METADATA_IGNORE_SUFFIX)) ) + while( (tag = av_dict_get(ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX)) ) { //DEBUG DPRINTF(E_DEBUG, L_METADATA, " %-16s: %s\n", tag->key, tag->value); if( strcmp(tag->key, "title") == 0 ) @@ -1575,7 +1575,7 @@ GetVideoMetadata(const char * path, char * name) #endif #endif video_no_dlna: - av_close_input_file(ctx); + avformat_close_input(&ctx); #ifdef TIVO_SUPPORT if( ends_with(path, ".TiVo") && is_tivo_file(path) )