]> git.sesse.net Git - ffmpeg/commitdiff
img2dec: export avg_frame_rate
authorAnton Khirnov <anton@khirnov.net>
Wed, 7 Oct 2020 11:02:39 +0000 (13:02 +0200)
committerAnton Khirnov <anton@khirnov.net>
Thu, 10 Dec 2020 08:44:40 +0000 (09:44 +0100)
libavformat/img2dec.c

index a08d4f7977d08440cf8c7bd048c4311efa22662f..ccb933ae33eae31b39b103b9d9f6575f79ed9aff 100644 (file)
@@ -220,8 +220,10 @@ int ff_img_read_header(AVFormatContext *s1)
         avpriv_set_pts_info(st, 64, 1, 1000000000);
     } else if (s->ts_from_file)
         avpriv_set_pts_info(st, 64, 1, 1);
-    else
+    else {
         avpriv_set_pts_info(st, 64, s->framerate.den, s->framerate.num);
+        st->avg_frame_rate = s->framerate;
+    }
 
     if (s->width && s->height) {
         st->codecpar->width  = s->width;