1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2026-06-19 19:03:00 +02:00

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>
(cherry picked from commit 95fe0658d7)
This commit is contained in:
James Almer
2026-05-28 12:05:29 -03:00
parent a995680756
commit 9b6ffd74b5
+4 -6
View File
@@ -1178,15 +1178,13 @@ static int mov_read_chnl(MOVContext *c, AVIOContext *pb, MOVAtom atom)
version = avio_r8(pb); version = avio_r8(pb);
flags = avio_rb24(pb); flags = avio_rb24(pb);
if (version != 0 || flags != 0) { if (version != 0 || flags != 0) {
av_log(c->fc, AV_LOG_ERROR, av_log(c->fc, AV_LOG_WARNING,
"Unsupported 'chnl' box with version %d, flags: %#x", "Unsupported 'chnl' box with version %d, flags: %#x\n",
version, flags); version, flags);
return AVERROR_INVALIDDATA; return 0;
} }
ret = ff_mov_read_chnl(c->fc, pb, st); ff_mov_read_chnl(c->fc, pb, st);
if (ret < 0)
return ret;
if (avio_tell(pb) != end) { if (avio_tell(pb) != end) {
av_log(c->fc, AV_LOG_WARNING, "skip %" PRId64 " bytes of unknown data inside chnl\n", av_log(c->fc, AV_LOG_WARNING, "skip %" PRId64 " bytes of unknown data inside chnl\n",