avformat/mov: don't abort on unsupported or invalid chnl boxes

They are optional and just define a channel layout, which may also be defined
by the underlying codec.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2026-05-28 12:05:29 -03:00
parent fd1c8fa0e6
commit 95fe0658d7
+7 -5
View File
@@ -1238,15 +1238,17 @@ static int mov_read_chnl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
version = avio_r8(pb);
flags = avio_rb24(pb);
if (version > 1 || flags != 0) {
av_log(c->fc, AV_LOG_ERROR,
"Unsupported 'chnl' box with version %d, flags: %#x",
av_log(c->fc, AV_LOG_WARNING,
"Unsupported 'chnl' box with version %d, flags: %#x\n",
version, flags);
return AVERROR_INVALIDDATA;
return 0;
}
ret = ff_mov_read_chnl(c->fc, pb, st, version);
if (ret < 0)
return ret;
if (ret < 0) {
avio_seek(pb, end, SEEK_SET);
return 0;
}
if (avio_tell(pb) != end) {
av_log(c->fc, AV_LOG_WARNING, "skip %" PRId64 " bytes of unknown data inside chnl\n",