mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-13 17:07:21 +00:00
avformat/mov: relax check on proj box size
Pico VR adds a '\0' after projection_type (a real C string than
a fourcc). It's not strictly correct, but doesn't affect parsing.
[prji: Projection Information Box]
position = 149574743
size = 17
version = 0
flags = 0x000000
projection_type = rect
Co-Authored-by: Keven Ma
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
@@ -6853,15 +6853,17 @@ static int mov_read_vexu_proj(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
st = c->fc->streams[c->fc->nb_streams - 1];
|
||||
sc = st->priv_data;
|
||||
|
||||
if (atom.size != 16) {
|
||||
if (atom.size < 16) {
|
||||
av_log(c->fc, AV_LOG_ERROR, "Invalid size for proj box: %"PRIu64"\n", atom.size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
size = avio_rb32(pb);
|
||||
if (size != 16) {
|
||||
if (size < 16) {
|
||||
av_log(c->fc, AV_LOG_ERROR, "Invalid size for prji box: %d\n", size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
} else if (size > 16) {
|
||||
av_log(c->fc, AV_LOG_WARNING, "Box has more bytes (%d) than prji box required (16) \n", size);
|
||||
}
|
||||
|
||||
tag = avio_rl32(pb);
|
||||
|
||||
Reference in New Issue
Block a user