[vlc-commits] packetizer: hevc: set fmtout rate when unknown

Francois Cartegnie git at videolan.org
Tue Sep 24 20:57:17 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Sep  6 19:00:52 2019 +0200| [f851387a45c3147e13437765206f0dca179f2c4a] | committer: Francois Cartegnie

packetizer: hevc: set fmtout rate when unknown

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

 modules/packetizer/hevc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
index fe919df4b2..a26c45a964 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -585,7 +585,7 @@ static void ActivateSets(decoder_t *p_dec,
     p_sys->p_active_vps = p_vps;
     if(p_sps)
     {
-        if(!p_dec->fmt_in.video.i_frame_rate || !p_dec->fmt_in.video.i_frame_rate_base)
+        if(!p_dec->fmt_out.video.i_frame_rate || !p_dec->fmt_out.video.i_frame_rate_base)
         {
             unsigned num, den;
             if(hevc_get_frame_rate( p_sps, p_vps, &num, &den ))
@@ -597,6 +597,8 @@ static void ActivateSets(decoder_t *p_dec,
                    num <= UINT_MAX / 2)
                     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;
         }
 
         if(p_dec->fmt_in.video.primaries == COLOR_PRIMARIES_UNDEF)



More information about the vlc-commits mailing list