diff mbox series

[FFmpeg-devel,10/20] fftools/ffmpeg_demux: log when the demuxer thread terminates

Message ID 20221018123701.25002-10-anton@khirnov.net
State Accepted
Commit 21ef1f2cecd12895f8cad0aa584ad0faa8c0364c
Headers show
Series [FFmpeg-devel,01/20] fftools/ffmpeg_opt: move opening input files to ffmpeg_demux.c | 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 Oct. 18, 2022, 12:36 p.m. UTC
Similar to what is done for muxing, may be useful for debugging.
---
 fftools/ffmpeg_demux.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 040213b392..29cff4b471 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -256,6 +256,12 @@  static void *input_thread(void *arg)
                 /* fallthrough to the error path */
             }
 
+            if (ret == AVERROR_EOF)
+                av_log(NULL, AV_LOG_VERBOSE, "EOF in input file %d\n", f->index);
+            else
+                av_log(NULL, AV_LOG_ERROR, "Error demuxing input file %d: %s\n",
+                       f->index, av_err2str(ret));
+
             break;
         }
 
@@ -317,6 +323,8 @@  finish:
 
     av_packet_free(&pkt);
 
+    av_log(NULL, AV_LOG_VERBOSE, "Terminating demuxer thread %d\n", f->index);
+
     return NULL;
 }