diff --git a/src/library/filescanner_ffmpeg.c b/src/library/filescanner_ffmpeg.c index 18967403..a19cfbd1 100644 --- a/src/library/filescanner_ffmpeg.c +++ b/src/library/filescanner_ffmpeg.c @@ -388,17 +388,18 @@ scan_metadata_ffmpeg(const char *file, struct media_file_info *mfi) return -1; } - free(path); - ret = avformat_find_stream_info(ctx, NULL); if (ret < 0) { DPRINTF(E_WARN, L_SCAN, "Cannot get stream info of '%s': %s\n", path, err2str(ret)); avformat_close_input(&ctx); + free(path); return -1; } + free(path); + #if 0 /* Dump input format as determined by ffmpeg */ av_dump_format(ctx, 0, file, 0);