fix coverart

This commit is contained in:
TangoCash
2017-10-27 23:38:20 +02:00
parent cf81628998
commit 5509c8c0c6
2 changed files with 19 additions and 11 deletions

View File

@@ -758,7 +758,7 @@ bool Input::GetMetadata(std::vector<std::string> &keys, std::vector<std::string>
for(unsigned int i = 0; i < avfc->nb_streams; i++) {
if (avfc->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC) {
AVPacket *pkt = &avfc->streams[i]->attached_pic;
FILE *cover_art = fopen("/tmp/cover.jpg", "wb");
FILE *cover_art = fopen("/tmp/.id3coverart", "wb");
if (cover_art) {
fwrite(pkt->data, pkt->size, 1, cover_art);
fclose(cover_art);