diff --git a/libavformat/mov.c b/libavformat/mov.c index 40105a408d..be52f53c0c 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8956,8 +8956,7 @@ static int mov_read_infe(MOVContext *c, AVIOContext *pb, MOVAtom atom) return AVERROR(ENOMEM); } - av_assert1(ret); - av_bprint_finalize(&item_name, &item->name); + av_bprint_finalize(&item_name, ret ? &item->name : NULL); item->item_id = item_id; item->type = item_type;