]> git.sesse.net Git - ffmpeg/blobdiff - fftools/ffmpeg.c
fftools/ffmpeg: copy average framerate for streamcopy, when known
[ffmpeg] / fftools / ffmpeg.c
index 8e6206647f85ae37a97b59f3a723d7602234a4d6..3ad11452da530db60a3a4efc87f74585903c3771 100644 (file)
@@ -3144,7 +3144,11 @@ static int init_output_stream_streamcopy(OutputStream *ost)
 
     if (!ost->frame_rate.num)
         ost->frame_rate = ist->framerate;
-    ost->st->avg_frame_rate = ost->frame_rate;
+
+    if (ost->frame_rate.num)
+        ost->st->avg_frame_rate = ost->frame_rate;
+    else
+        ost->st->avg_frame_rate = ist->st->avg_frame_rate;
 
     ret = avformat_transfer_internal_stream_timing_info(of->ctx->oformat, ost->st, ist->st, copy_tb);
     if (ret < 0)