[vlc-commits] demux: h26x: don't override packetizer values

Francois Cartegnie git at videolan.org
Fri Aug 3 16:24:11 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Aug  3 14:10:43 2018 +0200| [21fe4d73327a7ad27cb16f473d4e224f4482e81b] | committer: Francois Cartegnie

demux: h26x: don't override packetizer values

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

 modules/demux/mpeg/h26x.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/demux/mpeg/h26x.c b/modules/demux/mpeg/h26x.c
index 7229b95a30..155e93d269 100644
--- a/modules/demux/mpeg/h26x.c
+++ b/modules/demux/mpeg/h26x.c
@@ -354,8 +354,11 @@ static int GenericOpen( demux_t *p_demux, const char *psz_module,
 
     /* Load the mpegvideo packetizer */
     es_format_Init( &fmt, VIDEO_ES, i_codec );
-    fmt.video.i_frame_rate = p_sys->dts.i_divider_num;
-    fmt.video.i_frame_rate_base = p_sys->dts.i_divider_den;
+    if( f_fps )
+    {
+        fmt.video.i_frame_rate = p_sys->dts.i_divider_num;
+        fmt.video.i_frame_rate_base = p_sys->dts.i_divider_den;
+    }
     p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, psz_module );
     if( !p_sys->p_packetizer )
     {



More information about the vlc-commits mailing list