Merge commit 'f128b8e19ac7f702adae899ab91cc1e80f238761'
* commit 'f128b8e19ac7f702adae899ab91cc1e80f238761': mov: detect cover art pictures by content Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
commit
df06cb5611
@ -194,6 +194,14 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len)
|
||||
if (ret < 0)
|
||||
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->attached_pic = pkt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user