Prefer first embedded image that contains the 'front' keyword
This commit is contained in:
@@ -281,9 +281,7 @@ namespace lms::av
|
||||
|
||||
const AVPacket& pkt{ avstream->attached_pic };
|
||||
|
||||
picture.data = reinterpret_cast<const std::byte*>(pkt.data);
|
||||
picture.dataSize = pkt.size;
|
||||
|
||||
picture.data = std::span{ reinterpret_cast<const std::byte*>(pkt.data), static_cast<std::size_t>(pkt.size) };
|
||||
func(picture, metadata);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <filesystem>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
@@ -60,8 +61,7 @@ namespace lms::av
|
||||
struct Picture
|
||||
{
|
||||
std::string mimeType;
|
||||
const std::byte* data{}; // valid as long as IAudioFile exists
|
||||
std::size_t dataSize{};
|
||||
std::span<const std::byte> data; // valid as long as IAudioFile exists
|
||||
};
|
||||
|
||||
struct ContainerInfo
|
||||
|
||||
Reference in New Issue
Block a user