[vlc-devel] commit: libmpeg2: Don't spam the log on bitrate changes in VBR streams ( Marian Ďurkovič )

git version control git at videolan.org
Sat Sep 19 08:11:41 CEST 2009


vlc | branch: 1.0-bugfix | Marian Ďurkovič <md at bts.sk> | Sat Sep 19 08:08:05 2009 +0200| [f947c7306c51e2c9375c74c570f3fa302697d68e] | committer: Marian Ďurkovič 

libmpeg2: Don't spam the log on bitrate changes in VBR streams
(cherry picked from commit 84aadd40cc826eb2eb7b5fb86b2960cf61c4e138)

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

 modules/codec/libmpeg2.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c
index 701b714..1d6a436 100644
--- a/modules/codec/libmpeg2.c
+++ b/modules/codec/libmpeg2.c
@@ -164,6 +164,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     p_sys->i_previous_pts = 0;
     p_sys->i_current_dts  = 0;
     p_sys->i_previous_dts = 0;
+    p_sys->i_aspect = 0;
     p_sys->b_garbage_pic = false;
     p_sys->b_slice_i  = false;
     p_sys->b_second_field = false;
@@ -698,6 +699,7 @@ static block_t *GetCc( decoder_t *p_dec, bool pb_present[4] )
 static void GetAR( decoder_t *p_dec )
 {
     decoder_sys_t *p_sys = p_dec->p_sys;
+    int i_old_aspect = p_sys->i_aspect;
 
     /* Check whether the input gave a particular aspect ratio */
     if( p_dec->fmt_in.video.i_aspect )
@@ -729,6 +731,9 @@ static void GetAR( decoder_t *p_dec )
         }
     }
 
+    if( p_sys->i_aspect == i_old_aspect )
+        return;
+
     if( p_sys->p_info->sequence->frame_period > 0 )
         msg_Dbg( p_dec,
                  "%dx%d (display %d,%d), aspect %d, sar %i:%i, %u.%03u fps",




More information about the vlc-devel mailing list