Commit 8a78ae2d authored by Vittorio Giovara's avatar Vittorio Giovara

segment: Check open_null_ctx() return value

Reported-By: infer
parent b7a4127a
......@@ -351,7 +351,8 @@ static int seg_write_trailer(struct AVFormatContext *s)
if (!seg->write_header_trailer) {
if ((ret = segment_end(oc, 0)) < 0)
goto fail;
open_null_ctx(&oc->pb);
if ((ret = open_null_ctx(&oc->pb)) < 0)
goto fail;
ret = av_write_trailer(oc);
close_null_ctx(oc->pb);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment