[vlc-commits] packetizer: hevc: fix frame rate update

Francois Cartegnie git at videolan.org
Wed Apr 21 14:45:01 UTC 2021


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Jul 26 14:44:31 2020 +0200| [0c8044f28a09c2adb71d15e6a3f96194c1614e48] | committer: Jean-Baptiste Kempf

packetizer: hevc: fix frame rate update
refs #24973

(cherry picked from commit 80c2957e3fca835ff63199a35a16db1420b73191)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=0c8044f28a09c2adb71d15e6a3f96194c1614e48
---

 modules/packetizer/hevc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
index c1742b890f..8113658d04 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -553,10 +553,12 @@ static void ActivateSets(decoder_t *p_dec,
             {
                 p_dec->fmt_out.video.i_frame_rate = num;
                 p_dec->fmt_out.video.i_frame_rate_base = den;
-                if(p_sys->dts.i_divider_den != den &&
-                   p_sys->dts.i_divider_num != 2 * num &&
-                   num <= UINT_MAX / 2)
+                if(num <= UINT_MAX / 2 &&
+                   (p_sys->dts.i_divider_den != den ||
+                    p_sys->dts.i_divider_num != 2 * num))
+                {
                     date_Change(&p_sys->dts, 2 * num, den);
+                }
             }
             p_dec->fmt_out.video.i_frame_rate = p_sys->dts.i_divider_num >> 1;
             p_dec->fmt_out.video.i_frame_rate_base = p_sys->dts.i_divider_den;



More information about the vlc-commits mailing list