avformat/smoothstreaming: Forward errors from copying white/blacklists
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 20 Dec 2019 17:50:21 +0000 (18:50 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 24 Jun 2020 14:07:38 +0000 (16:07 +0200)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/smoothstreamingenc.c

index 33bb404..eefc61d 100644 (file)
@@ -327,10 +327,12 @@ static int ism_write_header(AVFormatContext *s)
         }
 
         os->ctx = ctx = avformat_alloc_context();
-        if (!ctx || ff_copy_whiteblacklists(ctx, s) < 0) {
+        if (!ctx) {
             ret = AVERROR(ENOMEM);
             goto fail;
         }
+        if ((ret = ff_copy_whiteblacklists(ctx, s)) < 0)
+            goto fail;
         ctx->oformat = oformat;
         ctx->interrupt_callback = s->interrupt_callback;