diff mbox series

[FFmpeg-devel] avformat/webvttdec: Remove write-only variable

Message ID 20200417014919.28660-1-andreas.rheinhardt@gmail.com
State Accepted
Commit e35a59ea63a699b599e729f5fa8058d83dc73ada
Headers show
Series [FFmpeg-devel] avformat/webvttdec: Remove write-only variable | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Andreas Rheinhardt April 17, 2020, 1:49 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/webvttdec.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Andreas Rheinhardt April 21, 2020, 12:24 a.m. UTC | #1
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/webvttdec.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c
> index 52579c5ed2..6c4d5f6736 100644
> --- a/libavformat/webvttdec.c
> +++ b/libavformat/webvttdec.c
> @@ -60,7 +60,7 @@ static int64_t read_ts(const char *s)
>  static int webvtt_read_header(AVFormatContext *s)
>  {
>      WebVTTContext *webvtt = s->priv_data;
> -    AVBPrint header, cue;
> +    AVBPrint cue;
>      int res = 0;
>      AVStream *st = avformat_new_stream(s, NULL);
>  
> @@ -71,7 +71,6 @@ static int webvtt_read_header(AVFormatContext *s)
>      st->codecpar->codec_id   = AV_CODEC_ID_WEBVTT;
>      st->disposition |= webvtt->kind;
>  
> -    av_bprint_init(&header, 0, AV_BPRINT_SIZE_UNLIMITED);
>      av_bprint_init(&cue,    0, AV_BPRINT_SIZE_UNLIMITED);
>  
>      for (;;) {
> @@ -166,7 +165,6 @@ static int webvtt_read_header(AVFormatContext *s)
>  
>  end:
>      av_bprint_finalize(&cue,    NULL);
> -    av_bprint_finalize(&header, NULL);
>      return res;
>  }
>  
> 
Will apply tomorrow unless there are objections.

- Andreas
Andreas Rheinhardt April 23, 2020, 6:31 p.m. UTC | #2
Andreas Rheinhardt:
> Andreas Rheinhardt:
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
>> ---
>>  libavformat/webvttdec.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c
>> index 52579c5ed2..6c4d5f6736 100644
>> --- a/libavformat/webvttdec.c
>> +++ b/libavformat/webvttdec.c
>> @@ -60,7 +60,7 @@ static int64_t read_ts(const char *s)
>>  static int webvtt_read_header(AVFormatContext *s)
>>  {
>>      WebVTTContext *webvtt = s->priv_data;
>> -    AVBPrint header, cue;
>> +    AVBPrint cue;
>>      int res = 0;
>>      AVStream *st = avformat_new_stream(s, NULL);
>>  
>> @@ -71,7 +71,6 @@ static int webvtt_read_header(AVFormatContext *s)
>>      st->codecpar->codec_id   = AV_CODEC_ID_WEBVTT;
>>      st->disposition |= webvtt->kind;
>>  
>> -    av_bprint_init(&header, 0, AV_BPRINT_SIZE_UNLIMITED);
>>      av_bprint_init(&cue,    0, AV_BPRINT_SIZE_UNLIMITED);
>>  
>>      for (;;) {
>> @@ -166,7 +165,6 @@ static int webvtt_read_header(AVFormatContext *s)
>>  
>>  end:
>>      av_bprint_finalize(&cue,    NULL);
>> -    av_bprint_finalize(&header, NULL);
>>      return res;
>>  }
>>  
>>
> Will apply tomorrow unless there are objections.
> 
> - Andreas
> 
Applied.

- Andreas
diff mbox series

Patch

diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c
index 52579c5ed2..6c4d5f6736 100644
--- a/libavformat/webvttdec.c
+++ b/libavformat/webvttdec.c
@@ -60,7 +60,7 @@  static int64_t read_ts(const char *s)
 static int webvtt_read_header(AVFormatContext *s)
 {
     WebVTTContext *webvtt = s->priv_data;
-    AVBPrint header, cue;
+    AVBPrint cue;
     int res = 0;
     AVStream *st = avformat_new_stream(s, NULL);
 
@@ -71,7 +71,6 @@  static int webvtt_read_header(AVFormatContext *s)
     st->codecpar->codec_id   = AV_CODEC_ID_WEBVTT;
     st->disposition |= webvtt->kind;
 
-    av_bprint_init(&header, 0, AV_BPRINT_SIZE_UNLIMITED);
     av_bprint_init(&cue,    0, AV_BPRINT_SIZE_UNLIMITED);
 
     for (;;) {
@@ -166,7 +165,6 @@  static int webvtt_read_header(AVFormatContext *s)
 
 end:
     av_bprint_finalize(&cue,    NULL);
-    av_bprint_finalize(&header, NULL);
     return res;
 }