[FFmpeg-cvslog] img2dec: export avg_frame_rate

Anton Khirnov git at videolan.org
Thu Dec 10 11:11:28 EET 2020


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Oct  7 13:02:39 2020 +0200| [63c2e500d23a9348de19a402b8e256d8ec56c5bc] | committer: Anton Khirnov

img2dec: export avg_frame_rate

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=63c2e500d23a9348de19a402b8e256d8ec56c5bc
---

 libavformat/img2dec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index a08d4f7977..ccb933ae33 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -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;



More information about the ffmpeg-cvslog mailing list