[FFmpeg-devel] avformat/mlvdec:drop unnecessary check before ff_format_io_close

Submitted by Steven Liu on Nov. 7, 2019, 10:49 p.m.

Details

Message ID 20191107224951.32384-1-lq@chinaffmpeg.org
State New
Headers show

Commit Message

Steven Liu Nov. 7, 2019, 10:49 p.m.
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
 libavformat/mlvdec.c | 1 -
 1 file changed, 1 deletion(-)

Comments

mypopy@gmail.com Nov. 8, 2019, 1:27 a.m.
On Fri, Nov 8, 2019 at 6:50 AM Steven Liu <lq@chinaffmpeg.org> wrote:

> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
> ---
>  libavformat/mlvdec.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
> index 68ca2c5e1c..3b4cb6befd 100644
> --- a/libavformat/mlvdec.c
> +++ b/libavformat/mlvdec.c
> @@ -462,7 +462,6 @@ static int read_close(AVFormatContext *s)
>      MlvContext *mlv = s->priv_data;
>      int i;
>      for (i = 0; i < 100; i++)
> -        if (mlv->pb[i])
>              ff_format_io_close(s, &mlv->pb[i]);
>      return 0;
>  }
> --
> 2.15.1
>
> LGTM
Linjie Fu Nov. 8, 2019, 1:32 a.m.
> -----Original Message-----

> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of

> Steven Liu

> Sent: Friday, November 8, 2019 06:50

> To: ffmpeg-devel@ffmpeg.org

> Cc: Steven Liu <lq@chinaffmpeg.org>

> Subject: [FFmpeg-devel] [PATCH] avformat/mlvdec:drop unnecessary check

> before ff_format_io_close

> 

> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>

> ---

>  libavformat/mlvdec.c | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c

> index 68ca2c5e1c..3b4cb6befd 100644

> --- a/libavformat/mlvdec.c

> +++ b/libavformat/mlvdec.c

> @@ -462,7 +462,6 @@ static int read_close(AVFormatContext *s)

>      MlvContext *mlv = s->priv_data;

>      int i;

>      for (i = 0; i < 100; i++)

> -        if (mlv->pb[i])

>              ff_format_io_close(s, &mlv->pb[i]);

>      return 0;

>  }


Missing indentation fixing?

- linjie
Steven Liu Nov. 9, 2019, 2:44 a.m.
> 在 2019年11月8日,10:32,Fu, Linjie <linjie.fu@intel.com> 写道:
> 
>> -----Original Message-----
>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>> Steven Liu
>> Sent: Friday, November 8, 2019 06:50
>> To: ffmpeg-devel@ffmpeg.org
>> Cc: Steven Liu <lq@chinaffmpeg.org>
>> Subject: [FFmpeg-devel] [PATCH] avformat/mlvdec:drop unnecessary check
>> before ff_format_io_close
>> 
>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>> ---
>> libavformat/mlvdec.c | 1 -
>> 1 file changed, 1 deletion(-)
>> 
>> diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
>> index 68ca2c5e1c..3b4cb6befd 100644
>> --- a/libavformat/mlvdec.c
>> +++ b/libavformat/mlvdec.c
>> @@ -462,7 +462,6 @@ static int read_close(AVFormatContext *s)
>>     MlvContext *mlv = s->priv_data;
>>     int i;
>>     for (i = 0; i < 100; i++)
>> -        if (mlv->pb[i])
>>             ff_format_io_close(s, &mlv->pb[i]);
>>     return 0;
>> }
> 
> Missing indentation fixing?
fixed locally and pushed.
> 
> - linjie
> _______________________________________________
> 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".

Thanks
Steven

Patch hide | download patch | download mbox

diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c
index 68ca2c5e1c..3b4cb6befd 100644
--- a/libavformat/mlvdec.c
+++ b/libavformat/mlvdec.c
@@ -462,7 +462,6 @@  static int read_close(AVFormatContext *s)
     MlvContext *mlv = s->priv_data;
     int i;
     for (i = 0; i < 100; i++)
-        if (mlv->pb[i])
             ff_format_io_close(s, &mlv->pb[i]);
     return 0;
 }