fix coverart

Origin commit data
------------------
Branch: master
Commit: 5509c8c0c6
Author: TangoCash <eric@loxat.de>
Date: 2017-10-27 (Fri, 27 Oct 2017)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2017-10-27 23:38:20 +02:00
parent d2b6333f9b
commit d9b083e71e
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);