[libav-commits] hdsenc: Check the init_file() return code

Michael Niedermayer git at libav.org
Sat Dec 14 16:51:49 CET 2013


Module: libav
Branch: master
Commit: 797f2a791397210ec1b591b326658805c5dbf104

Author:    Michael Niedermayer <michaelni at gmx.at>
Committer: Martin Storsjö <martin at martin.st>
Date:      Thu Dec 12 21:04:24 2013 +0100

hdsenc: Check the init_file() return code

Signed-off-by: Martin Storsjö <martin at martin.st>

---

 libavformat/hdsenc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c
index c093293..6217c1f 100644
--- a/libavformat/hdsenc.c
+++ b/libavformat/hdsenc.c
@@ -412,7 +412,9 @@ static int hds_write_header(AVFormatContext *s)
 
         snprintf(os->temp_filename, sizeof(os->temp_filename),
                  "%s/stream%d_temp", s->filename, i);
-        init_file(s, os, 0);
+        ret = init_file(s, os, 0);
+        if (ret < 0)
+            goto fail;
 
         if (!os->has_video && c->min_frag_duration <= 0) {
             av_log(s, AV_LOG_WARNING,



More information about the libav-commits mailing list