avformat/au: Remove redundant av_freep()

This av_freep(&key) in conjunction with the fact that the loop condition
checks for key != NULL was equivalent to a av_freep(&key) + a break
immediately thereafter. But given that there is an av_freep(&key)
directly after the loop, the av_freep(&key) is unnecessary and the break
can also be added explicitly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2020-07-13 17:18:48 +02:00
parent 8d3556b7a3
commit 84340497c0

View File

@ -107,11 +107,11 @@ static int au_read_annotation(AVFormatContext *s, int size)
av_log(s, AV_LOG_ERROR, "Memory error while parsing AU metadata.\n");
} else {
av_bprint_init(&bprint, 64, AV_BPRINT_SIZE_UNLIMITED);
for (i = 0; i < FF_ARRAY_ELEMS(keys) && key != NULL; i++) {
for (i = 0; i < FF_ARRAY_ELEMS(keys); i++) {
if (av_strcasecmp(keys[i], key) == 0) {
av_dict_set(&(s->metadata), keys[i], value, AV_DICT_DONT_STRDUP_VAL);
av_freep(&key);
value = NULL;
break;
}
}
}