Commit df06cb56 authored by Hendrik Leppkes's avatar Hendrik Leppkes

Merge commit 'f128b8e1'

* commit 'f128b8e1':
  mov: detect cover art pictures by content
Merged-by: 's avatarHendrik Leppkes <h.leppkes@gmail.com>
parents 3a8b37c5 f128b8e1
...@@ -194,6 +194,14 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len) ...@@ -194,6 +194,14 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len)
if (ret < 0) if (ret < 0)
return ret; return ret;
if (pkt.size >= 8 && id != AV_CODEC_ID_BMP) {
if (AV_RB64(pkt.data) == 0x89504e470d0a1a0a) {
id = AV_CODEC_ID_PNG;
} else {
id = AV_CODEC_ID_MJPEG;
}
}
st->disposition |= AV_DISPOSITION_ATTACHED_PIC; st->disposition |= AV_DISPOSITION_ATTACHED_PIC;
st->attached_pic = pkt; st->attached_pic = pkt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment