[FFmpeg-cvslog] segment: Check open_null_ctx() return value
Vittorio Giovara
git at videolan.org
Fri Jun 12 22:34:04 CEST 2015
ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Fri Jun 12 13:39:16 2015 +0100| [8a78ae2d2101622fd244b99178d8bc61175c878e] | committer: Vittorio Giovara
segment: Check open_null_ctx() return value
Reported-By: infer
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a78ae2d2101622fd244b99178d8bc61175c878e
---
libavformat/segment.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 55ba656..3479134 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -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 {
More information about the ffmpeg-cvslog
mailing list