From c0db2609e8eaafdfce465011be32d7b47030923f Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Tue, 20 Oct 2020 11:01:42 +0900 Subject: [PATCH] Add a comment explaining FFmpegReader::HasAlbumArt()'s behavior --- src/FFmpegReader.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index f8af2ba1..eb9debfa 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -637,6 +637,9 @@ void FFmpegReader::Close() { } bool FFmpegReader::HasAlbumArt() { + // Check if the video stream we use is an attached picture + // This won't return true if the file has a cover image as a secondary stream + // like an MKV file with an attached image file return pFormatCtx && videoStream >= 0 && pFormatCtx->streams[videoStream] && (pFormatCtx->streams[videoStream]->disposition & AV_DISPOSITION_ATTACHED_PIC); }