diff mbox series

[FFmpeg-devel,17/24] ffmpeg: do not log to the muxer context

Message ID 20211213152042.5900-17-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/24] ffmpeg: pass the muxer context explicitly to some functions | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Anton Khirnov Dec. 13, 2021, 3:20 p.m. UTC
All other logging goes to NULL context.
---
 fftools/ffmpeg.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Michael Niedermayer Dec. 16, 2021, 7:48 p.m. UTC | #1
On Mon, Dec 13, 2021 at 04:20:35PM +0100, Anton Khirnov wrote:
> All other logging goes to NULL context.
> ---
>  fftools/ffmpeg.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
> index d69e4119ef..afd442ff4e 100644
> --- a/fftools/ffmpeg.c
> +++ b/fftools/ffmpeg.c
> @@ -2954,7 +2954,6 @@ static void init_encoder_time_base(OutputStream *ost, AVRational default_time_ba
>  {
>      InputStream *ist = get_input_stream(ost);
>      AVCodecContext *enc_ctx = ost->enc_ctx;
> -    AVFormatContext *oc;
>  
>      if (ost->enc_timebase.num > 0) {
>          enc_ctx->time_base = ost->enc_timebase;
> @@ -2967,8 +2966,7 @@ static void init_encoder_time_base(OutputStream *ost, AVRational default_time_ba
>              return;
>          }
>  
> -        oc = output_files[ost->file_index]->ctx;
> -        av_log(oc, AV_LOG_WARNING, "Input stream data not available, using default time base\n");
> +        av_log(NULL, AV_LOG_WARNING, "Input stream data not available, using default time base\n");
>      }

If this no longer shows the muxer then some information should be added so
the user knows to which part the warning belongs on a complex transcode

thx

[...]
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index d69e4119ef..afd442ff4e 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2954,7 +2954,6 @@  static void init_encoder_time_base(OutputStream *ost, AVRational default_time_ba
 {
     InputStream *ist = get_input_stream(ost);
     AVCodecContext *enc_ctx = ost->enc_ctx;
-    AVFormatContext *oc;
 
     if (ost->enc_timebase.num > 0) {
         enc_ctx->time_base = ost->enc_timebase;
@@ -2967,8 +2966,7 @@  static void init_encoder_time_base(OutputStream *ost, AVRational default_time_ba
             return;
         }
 
-        oc = output_files[ost->file_index]->ctx;
-        av_log(oc, AV_LOG_WARNING, "Input stream data not available, using default time base\n");
+        av_log(NULL, AV_LOG_WARNING, "Input stream data not available, using default time base\n");
     }
 
     enc_ctx->time_base = default_time_base;