diff mbox series

[FFmpeg-devel,2/2] avformat/dvenc: Don't zero unnecessarily

Message ID 20200126071311.2394-1-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/2] avformat/dvenc: Replace write_trailer by deinit function | expand

Checks

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

Commit Message

Andreas Rheinhardt Jan. 26, 2020, 7:13 a.m. UTC
The muxing context has already been zeroed when it was allocated, hence
it is unnecessary to do it again.

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

Comments

Paul B Mahol Jan. 26, 2020, 9:11 a.m. UTC | #1
lgtm

On 1/26/20, Andreas Rheinhardt <andreas.rheinhardt@gmail.com> wrote:
> The muxing context has already been zeroed when it was allocated, hence
> it is unnecessary to do it again.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/dvenc.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
> index b89ad4d1c8..c71e532771 100644
> --- a/libavformat/dvenc.c
> +++ b/libavformat/dvenc.c
> @@ -305,9 +305,6 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s)
>      if (s->nb_streams > 5)
>          return NULL;
>
> -    c->n_ast  = 0;
> -    c->ast[0] = c->ast[1] = c->ast[2] = c->ast[3] = NULL;
> -
>      /* We have to sort out where audio and where video stream is */
>      for (i=0; i<s->nb_streams; i++) {
>          switch (s->streams[i]->codecpar->codec_type) {
> --
> 2.20.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Michael Niedermayer Jan. 26, 2020, 4:27 p.m. UTC | #2
On Sun, Jan 26, 2020 at 10:11:03AM +0100, Paul B Mahol wrote:
> lgtm

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index b89ad4d1c8..c71e532771 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -305,9 +305,6 @@  static DVMuxContext* dv_init_mux(AVFormatContext* s)
     if (s->nb_streams > 5)
         return NULL;
 
-    c->n_ast  = 0;
-    c->ast[0] = c->ast[1] = c->ast[2] = c->ast[3] = NULL;
-
     /* We have to sort out where audio and where video stream is */
     for (i=0; i<s->nb_streams; i++) {
         switch (s->streams[i]->codecpar->codec_type) {