ffmpeg: eliminated local variable "tag"
The function ffmpeg_tag() already has the variable base.tag, which can be used for this.
This commit is contained in:
parent
7cbd9821c6
commit
25f4efcdb8
|
@ -321,27 +321,24 @@ static struct tag *ffmpeg_tag(char *file)
|
||||||
struct input_stream input;
|
struct input_stream input;
|
||||||
BasePtrs base;
|
BasePtrs base;
|
||||||
bool ret;
|
bool ret;
|
||||||
struct tag *tag = NULL;
|
|
||||||
|
|
||||||
if (!input_stream_open(&input, file)) {
|
if (!input_stream_open(&input, file)) {
|
||||||
ERROR("failed to open %s\n", file);
|
ERROR("failed to open %s\n", file);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
tag = tag_new();
|
|
||||||
|
|
||||||
base.decoder = NULL;
|
base.decoder = NULL;
|
||||||
base.tag = tag;
|
base.tag = tag_new();
|
||||||
|
|
||||||
ret = ffmpeg_helper(&input, ffmpeg_tag_internal, &base);
|
ret = ffmpeg_helper(&input, ffmpeg_tag_internal, &base);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
free(tag);
|
free(base.tag);
|
||||||
tag = NULL;
|
base.tag = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
input_stream_close(&input);
|
input_stream_close(&input);
|
||||||
|
|
||||||
return tag;
|
return base.tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue