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

Francois Cartegnie git at videolan.org
Sun Jul 26 14:47:17 CEST 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Jul 26 14:44:31 2020 +0200| [80c2957e3fca835ff63199a35a16db1420b73191] | committer: Francois Cartegnie

packetizer: hevc: fix frame rate update
refs #24973

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=80c2957e3fca835ff63199a35a16db1420b73191
---

 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 b9f7473fa8..4b3ee0d2bf 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -594,10 +594,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