@@ -, +, @@ --- deadbeef/plugins/ffmpeg/ffmpeg.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) --- a/deadbeef/plugins/ffmpeg/ffmpeg.c +++ a/deadbeef/plugins/ffmpeg/ffmpeg.c @@ -140,7 +140,7 @@ ffmpeg_init (DB_fileinfo_t *_info, DB_playItem_t *it) { for (i = 0; i < info->fctx->nb_streams; i++) { info->ctx = info->fctx->streams[i]->codec; - if (info->ctx->codec_type == CODEC_TYPE_AUDIO) + if (info->ctx->codec_type == AVMEDIA_TYPE_AUDIO) { info->codec = avcodec_find_decoder (info->ctx->codec_id); if (info->codec != NULL) { @@ -490,7 +490,7 @@ ffmpeg_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) { for (i = 0; i < fctx->nb_streams; i++) { ctx = fctx->streams[i]->codec; - if (ctx->codec_type == CODEC_TYPE_AUDIO) + if (ctx->codec_type == AVMEDIA_TYPE_AUDIO) { codec = avcodec_find_decoder(ctx->codec_id); if (codec != NULL && !strcasecmp (codec->name, "alac")) { // only open alac streams @@ -704,7 +704,11 @@ ffmpeg_start (void) { ffmpeg_init_exts (); avcodec_init (); av_register_all (); +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 53, 0, 0 ) + av_register_protocol2(&vfswrapper, sizeof(vfswrapper)); +#else av_register_protocol (&vfswrapper); +#endif return 0; } @@ -745,7 +749,7 @@ ffmpeg_read_metadata (DB_playItem_t *it) { for (i = 0; i < fctx->nb_streams; i++) { ctx = fctx->streams[i]->codec; - if (ctx->codec_type == CODEC_TYPE_AUDIO) + if (ctx->codec_type == AVMEDIA_TYPE_AUDIO) { codec = avcodec_find_decoder(ctx->codec_id); if (codec != NULL) --