[vlc-commits] codec: vorbis: birates are signed. (fix #10324)

Francois Cartegnie git at videolan.org
Mon Jan 6 21:10:55 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jan  6 21:08:51 2014 +0100| [fba05eaa2aad38d86bc233c2465d8a6d7f056d2e] | committer: Francois Cartegnie

codec: vorbis: birates are signed. (fix #10324)

Negative being meaningless.

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

 modules/codec/vorbis.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/codec/vorbis.c b/modules/codec/vorbis.c
index a9554b6..85318fe 100644
--- a/modules/codec/vorbis.c
+++ b/modules/codec/vorbis.c
@@ -372,12 +372,12 @@ static int ProcessHeaders( decoder_t *p_dec )
     p_dec->fmt_out.audio.i_physical_channels =
         p_dec->fmt_out.audio.i_original_channels =
             pi_channels_maps[p_sys->vi.channels];
-    p_dec->fmt_out.i_bitrate = p_sys->vi.bitrate_nominal;
+    p_dec->fmt_out.i_bitrate = __MAX( 0, (int32_t) p_sys->vi.bitrate_nominal );
 
     date_Init( &p_sys->end_date, p_sys->vi.rate, 1 );
 
     msg_Dbg( p_dec, "channels:%d samplerate:%ld bitrate:%ld",
-             p_sys->vi.channels, p_sys->vi.rate, p_sys->vi.bitrate_nominal );
+             p_sys->vi.channels, p_sys->vi.rate, p_dec->fmt_out.i_bitrate );
 
     /* The next packet in order is the comments header */
     oggpacket.b_o_s  = 0;



More information about the vlc-commits mailing list