summaryrefslogtreecommitdiff
path: root/libavformat/webmdashenc.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-08-20 11:18:14 -0400
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-20 21:03:08 +0200
commitb772847eb04ea9c1213c40be1720ce6a8af042f6 (patch)
treea34cacaa9637306486c4e01ddd4d6ea976e174c3 /libavformat/webmdashenc.c
parent538ea9a209762ccccd1bd7f8b4990cefeb55043a (diff)
avformat/webmdashenc: fix uninitialized variable
Fixes -Wsometimes-uninitialized from http://fate.ffmpeg.org/report.cgi?time=20150820031140&slot=arm64-darwin-clang-apple-5.1 Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/webmdashenc.c')
-rw-r--r--libavformat/webmdashenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/webmdashenc.c b/libavformat/webmdashenc.c
index 76ea4237e2..898e4641d3 100644
--- a/libavformat/webmdashenc.c
+++ b/libavformat/webmdashenc.c
@@ -392,10 +392,10 @@ static int write_adaptation_set(AVFormatContext *s, int as_index)
if (w->is_live) {
AVDictionaryEntry *filename =
av_dict_get(s->streams[as->streams[i]]->metadata, FILENAME, NULL, 0);
- if (!filename ||
- (ret = parse_filename(filename->value, &representation_id, NULL, NULL))) {
+ if (!filename)
+ return AVERROR(EINVAL);
+ if (ret = parse_filename(filename->value, &representation_id, NULL, NULL))
return ret;
- }
} else {
representation_id = av_asprintf("%d", w->representation_id++);
if (!representation_id) return AVERROR(ENOMEM);