diff mbox series

[FFmpeg-devel,11/11] avformat/wtvdec: Cosmetics

Message ID 20200107135549.22581-11-andreas.rheinhardt@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,01/11] avformat/avformat: Update AVInputFormat.read_packet documentation | expand

Checks

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

Commit Message

Andreas Rheinhardt Jan. 7, 2020, 1:55 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/wtvdec.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

James Almer Jan. 8, 2020, 1:38 a.m. UTC | #1
On 1/7/2020 10:18 PM, Peter Ross wrote:
> On Tue, Jan 07, 2020 at 02:55:49PM +0100, Andreas Rheinhardt wrote:
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
>> ---
>>  libavformat/wtvdec.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
>> index 92629bb31b..67d934f074 100644
>> --- a/libavformat/wtvdec.c
>> +++ b/libavformat/wtvdec.c
>> @@ -290,7 +290,7 @@ static AVIOContext * wtvfile_open2(AVFormatContext *s, const uint8_t *buf, int b
>>  
>>          buf += dir_length;
>>      }
>> -    return 0;
>> +    return NULL;
>>  }
>>  
>>  #define wtvfile_open(s, buf, buf_size, filename) \
>> @@ -904,10 +904,10 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
>>                      wtv->last_valid_pts = wtv->pts;
>>                      if (wtv->epoch == AV_NOPTS_VALUE || wtv->pts < wtv->epoch)
>>                          wtv->epoch = wtv->pts;
>> -                if (mode == SEEK_TO_PTS && wtv->pts >= seekts) {
>> -                    avio_skip(pb, WTV_PAD8(len) - consumed);
>> -                    return 0;
>> -                }
>> +                    if (mode == SEEK_TO_PTS && wtv->pts >= seekts) {
>> +                        avio_skip(pb, WTV_PAD8(len) - consumed);
>> +                        return 0;
>> +                    }
>>                  }
>>              }
>>          } else if (!ff_guidcmp(g, ff_data_guid)) {
> 
> looks good. please apply.

Applied.
diff mbox series

Patch

diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index 92629bb31b..67d934f074 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -290,7 +290,7 @@  static AVIOContext * wtvfile_open2(AVFormatContext *s, const uint8_t *buf, int b
 
         buf += dir_length;
     }
-    return 0;
+    return NULL;
 }
 
 #define wtvfile_open(s, buf, buf_size, filename) \
@@ -904,10 +904,10 @@  static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
                     wtv->last_valid_pts = wtv->pts;
                     if (wtv->epoch == AV_NOPTS_VALUE || wtv->pts < wtv->epoch)
                         wtv->epoch = wtv->pts;
-                if (mode == SEEK_TO_PTS && wtv->pts >= seekts) {
-                    avio_skip(pb, WTV_PAD8(len) - consumed);
-                    return 0;
-                }
+                    if (mode == SEEK_TO_PTS && wtv->pts >= seekts) {
+                        avio_skip(pb, WTV_PAD8(len) - consumed);
+                        return 0;
+                    }
                 }
             }
         } else if (!ff_guidcmp(g, ff_data_guid)) {