diff mbox series

[FFmpeg-devel,17/27] fftools/ffmpeg: do not log to the decoder context

Message ID 20220723140952.31814-17-anton@khirnov.net
State Accepted
Commit ecfdab20e4acd7697f7f37f73b42de3622305aa4
Headers show
Series [FFmpeg-devel,01/27] fftools/ffmpeg: replace AVFrame.pkt_duration with duration | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Anton Khirnov July 23, 2022, 2:09 p.m. UTC
That should only be done from inside the decoder. Log to NULL instead,
as is the current convention in ffmpeg.
---
 fftools/ffmpeg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 19173c75e1..cc0ede8a54 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -259,7 +259,7 @@  void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub)
         num_rects = 0;
     }
     if (sub2video_get_blank_frame(ist) < 0) {
-        av_log(ist->dec_ctx, AV_LOG_ERROR,
+        av_log(NULL, AV_LOG_ERROR,
                "Impossible to get a blank canvas.\n");
         return;
     }
@@ -2324,7 +2324,7 @@  static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output,
             end = av_rescale(subtitle.pts - ist->prev_sub.subtitle.pts,
                              1000, AV_TIME_BASE);
             if (end < ist->prev_sub.subtitle.end_display_time) {
-                av_log(ist->dec_ctx, AV_LOG_DEBUG,
+                av_log(NULL, AV_LOG_DEBUG,
                        "Subtitle duration reduced from %"PRId32" to %d%s\n",
                        ist->prev_sub.subtitle.end_display_time, end,
                        end <= 0 ? ", dropping it" : "");