diff mbox

[FFmpeg-devel,04/17] avformat/smoothstreaming: Forward errors from copying white/blacklists

Message ID 20191226105342.11175-4-andreas.rheinhardt@gmail.com
State Accepted
Commit 6c777a6688715b21a15cab2cd87c8379225e53ec
Headers show

Commit Message

Andreas Rheinhardt Dec. 26, 2019, 10:53 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/smoothstreamingenc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Andreas Rheinhardt June 23, 2020, 4:18 a.m. UTC | #1
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/smoothstreamingenc.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
> index 0e4f531f90..a5fd8a18db 100644
> --- a/libavformat/smoothstreamingenc.c
> +++ b/libavformat/smoothstreamingenc.c
> @@ -333,10 +333,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;
>  
> 
Ping. Will apply tomorrow unless there are objections.

- Andreas
diff mbox

Patch

diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
index 0e4f531f90..a5fd8a18db 100644
--- a/libavformat/smoothstreamingenc.c
+++ b/libavformat/smoothstreamingenc.c
@@ -333,10 +333,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;