[vlc-commits] demux: ogg: vorbis birates are signed.
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:07:36 2014 +0100| [6ac2e1cd98156d94b136682553dd903e087c7740] | committer: Francois Cartegnie
demux: ogg: vorbis birates are signed.
Negative being meaningless.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6ac2e1cd98156d94b136682553dd903e087c7740
---
modules/demux/ogg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index e589679..9c858c8 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -2350,7 +2350,8 @@ static void Ogg_ReadVorbisHeader( logical_stream_t *p_stream,
p_stream->f_rate = p_stream->fmt.audio.i_rate =
oggpack_read( &opb, 32 );
oggpack_adv( &opb, 32 );
- p_stream->fmt.i_bitrate = oggpack_read( &opb, 32 );
+ p_stream->fmt.i_bitrate = oggpack_read( &opb, 32 ); /* is signed 32 */
+ if( p_stream->fmt.i_bitrate > INT32_MAX ) p_stream->fmt.i_bitrate = 0;
}
static void Ogg_ReadSpeexHeader( logical_stream_t *p_stream,
More information about the vlc-commits
mailing list