diff mbox series

[FFmpeg-devel,05/17] avformat/webm_chunk: Don't use child AVFormatContext for logging

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

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Andreas Rheinhardt March 2, 2020, 4:44 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/webm_chunk.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Andreas Rheinhardt March 25, 2020, 1:57 a.m. UTC | #1
Andreas Rheinhardt:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
> ---
>  libavformat/webm_chunk.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c
> index bc3d346a00..0d4e3598ed 100644
> --- a/libavformat/webm_chunk.c
> +++ b/libavformat/webm_chunk.c
> @@ -87,25 +87,24 @@ static int chunk_mux_init(AVFormatContext *s)
>  static int get_chunk_filename(AVFormatContext *s, int is_header, char filename[MAX_FILENAME_SIZE])
>  {
>      WebMChunkContext *wc = s->priv_data;
> -    AVFormatContext *oc = wc->avf;
>      if (!filename) {
>          return AVERROR(EINVAL);
>      }
>      if (is_header) {
>          int len;
>          if (!wc->header_filename) {
> -            av_log(oc, AV_LOG_ERROR, "No header filename provided\n");
> +            av_log(s, AV_LOG_ERROR, "No header filename provided\n");
>              return AVERROR(EINVAL);
>          }
>          len = av_strlcpy(filename, wc->header_filename, MAX_FILENAME_SIZE);
>          if (len >= MAX_FILENAME_SIZE) {
> -            av_log(oc, AV_LOG_ERROR, "Header filename too long\n");
> +            av_log(s, AV_LOG_ERROR, "Header filename too long\n");
>              return AVERROR(EINVAL);
>          }
>      } else {
>          if (av_get_frame_filename(filename, MAX_FILENAME_SIZE,
>                                    s->url, wc->chunk_index - 1) < 0) {
> -            av_log(oc, AV_LOG_ERROR, "Invalid chunk filename template '%s'\n", s->url);
> +            av_log(s, AV_LOG_ERROR, "Invalid chunk filename template '%s'\n", s->url);
>              return AVERROR(EINVAL);
>          }
>      }
> 
Ping. If no one objects, I will merge the webm_chunk patches tomorrow.

- Andreas
Andreas Rheinhardt March 26, 2020, 1:43 a.m. UTC | #2
Andreas Rheinhardt:
> Andreas Rheinhardt:
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
>> ---
>>  libavformat/webm_chunk.c | 7 +++----
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c
>> index bc3d346a00..0d4e3598ed 100644
>> --- a/libavformat/webm_chunk.c
>> +++ b/libavformat/webm_chunk.c
>> @@ -87,25 +87,24 @@ static int chunk_mux_init(AVFormatContext *s)
>>  static int get_chunk_filename(AVFormatContext *s, int is_header, char filename[MAX_FILENAME_SIZE])
>>  {
>>      WebMChunkContext *wc = s->priv_data;
>> -    AVFormatContext *oc = wc->avf;
>>      if (!filename) {
>>          return AVERROR(EINVAL);
>>      }
>>      if (is_header) {
>>          int len;
>>          if (!wc->header_filename) {
>> -            av_log(oc, AV_LOG_ERROR, "No header filename provided\n");
>> +            av_log(s, AV_LOG_ERROR, "No header filename provided\n");
>>              return AVERROR(EINVAL);
>>          }
>>          len = av_strlcpy(filename, wc->header_filename, MAX_FILENAME_SIZE);
>>          if (len >= MAX_FILENAME_SIZE) {
>> -            av_log(oc, AV_LOG_ERROR, "Header filename too long\n");
>> +            av_log(s, AV_LOG_ERROR, "Header filename too long\n");
>>              return AVERROR(EINVAL);
>>          }
>>      } else {
>>          if (av_get_frame_filename(filename, MAX_FILENAME_SIZE,
>>                                    s->url, wc->chunk_index - 1) < 0) {
>> -            av_log(oc, AV_LOG_ERROR, "Invalid chunk filename template '%s'\n", s->url);
>> +            av_log(s, AV_LOG_ERROR, "Invalid chunk filename template '%s'\n", s->url);
>>              return AVERROR(EINVAL);
>>          }
>>      }
>>
> Ping. If no one objects, I will merge the webm_chunk patches tomorrow.
> 
> - Andreas
> 
Pushed.

- Andreas
diff mbox series

Patch

diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c
index bc3d346a00..0d4e3598ed 100644
--- a/libavformat/webm_chunk.c
+++ b/libavformat/webm_chunk.c
@@ -87,25 +87,24 @@  static int chunk_mux_init(AVFormatContext *s)
 static int get_chunk_filename(AVFormatContext *s, int is_header, char filename[MAX_FILENAME_SIZE])
 {
     WebMChunkContext *wc = s->priv_data;
-    AVFormatContext *oc = wc->avf;
     if (!filename) {
         return AVERROR(EINVAL);
     }
     if (is_header) {
         int len;
         if (!wc->header_filename) {
-            av_log(oc, AV_LOG_ERROR, "No header filename provided\n");
+            av_log(s, AV_LOG_ERROR, "No header filename provided\n");
             return AVERROR(EINVAL);
         }
         len = av_strlcpy(filename, wc->header_filename, MAX_FILENAME_SIZE);
         if (len >= MAX_FILENAME_SIZE) {
-            av_log(oc, AV_LOG_ERROR, "Header filename too long\n");
+            av_log(s, AV_LOG_ERROR, "Header filename too long\n");
             return AVERROR(EINVAL);
         }
     } else {
         if (av_get_frame_filename(filename, MAX_FILENAME_SIZE,
                                   s->url, wc->chunk_index - 1) < 0) {
-            av_log(oc, AV_LOG_ERROR, "Invalid chunk filename template '%s'\n", s->url);
+            av_log(s, AV_LOG_ERROR, "Invalid chunk filename template '%s'\n", s->url);
             return AVERROR(EINVAL);
         }
     }