diff mbox series

[FFmpeg-devel,2/17] avformat/hlsenc: Remove redundant setting of output format

Message ID 20200302043520.14165-2-andreas.rheinhardt@gmail.com
State Accepted
Commit 1ec0fb56a7640f740409110536aee97c0679c35c
Headers show
Series [FFmpeg-devel,1/17] avformat: Use correct error in case muxer is not found | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt March 2, 2020, 4:35 a.m. UTC
avformat_alloc_output_context2() already sets the oformat member, so
that there is no reason to overwrite it again with the value it already
has.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/hlsenc.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Andreas Rheinhardt May 6, 2020, 5:02 a.m. UTC | #1
Andreas Rheinhardt:
> avformat_alloc_output_context2() already sets the oformat member, so
> that there is no reason to overwrite it again with the value it already
> has.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/hlsenc.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index f6dd894343..e58da7328f 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -776,7 +776,6 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs)
>      if (!oc->url)
>          return AVERROR(ENOMEM);
>  
> -    oc->oformat                  = vs->oformat;
>      oc->interrupt_callback       = s->interrupt_callback;
>      oc->max_delay                = s->max_delay;
>      oc->opaque                   = s->opaque;
> @@ -790,7 +789,6 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs)
>          if (ret < 0)
>              return ret;
>          vtt_oc          = vs->vtt_avf;
> -        vtt_oc->oformat = vs->vtt_oformat;
>          av_dict_copy(&vtt_oc->metadata, s->metadata, 0);
>      }
>  
> 
Will apply this tomorrow unless there are objections.

- Andreas
diff mbox series

Patch

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index f6dd894343..e58da7328f 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -776,7 +776,6 @@  static int hls_mux_init(AVFormatContext *s, VariantStream *vs)
     if (!oc->url)
         return AVERROR(ENOMEM);
 
-    oc->oformat                  = vs->oformat;
     oc->interrupt_callback       = s->interrupt_callback;
     oc->max_delay                = s->max_delay;
     oc->opaque                   = s->opaque;
@@ -790,7 +789,6 @@  static int hls_mux_init(AVFormatContext *s, VariantStream *vs)
         if (ret < 0)
             return ret;
         vtt_oc          = vs->vtt_avf;
-        vtt_oc->oformat = vs->vtt_oformat;
         av_dict_copy(&vtt_oc->metadata, s->metadata, 0);
     }