update libavformat/mov.c.

Signed-off-by: yj <yujie57@huawei.com>
This commit is contained in:
yj 2024-05-17 07:02:10 +00:00 committed by Gitee
parent f7b34d16b9
commit eec2959c73
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -7780,13 +7780,11 @@ static int mov_read_gnre(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return ret;
}
for (i = 0; i < atom.size; ++i) {
if (0 == genre[i]) {
} else {
break;
}
if (genre[i] != 0) {
break;
}
}
char* activeGenre = genre + i;
av_dict_set(&c->fc->metadata, "genre", activeGenre, AV_DICT_DONT_OVERWRITE);
av_dict_set(&c->fc->metadata, "genre", genre + i, AV_DICT_DONT_OVERWRITE);
av_freep(&genre);
}
return 0;