If `AV_PKT_FLAG_KEY` stays unset on `pkt->flags`, the output stream
stays empty with little information about what is going on.
This change makes it easier to debug the situation for the user who
could then choose to use the `-copyinkf` option.
---
 fftools/ffmpeg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 01f04103cf..446439e285 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2006,8 +2006,10 @@ static void do_streamcopy(InputStream *ist, OutputStream 
*ost, const AVPacket *p
     }
 
     if ((!ost->frame_number && !(pkt->flags & AV_PKT_FLAG_KEY)) &&
-        !ost->copy_initial_nonkeyframes)
+        !ost->copy_initial_nonkeyframes) {
+        av_log(NULL, AV_LOG_DEBUG, "skipping initial non-keyframe\n");
         return;
+    }
 
     if (!ost->frame_number && !ost->copy_prior_start) {
         int64_t comp_start = start_time;
-- 
2.21.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to