[vlc-commits] Fix crash on .rm/rv30 file
Rafaël Carré
git at videolan.org
Sat Jul 16 17:34:57 CEST 2011
vlc | branch: master | Rafaël Carré <rafael.carre at gmail.com> | Sat Jul 16 11:33:39 2011 -0400| [e2fb53928bdc4651b6806982acf8088fb889dc1d] | committer: Rafaël Carré
Fix crash on .rm/rv30 file
Forward all available codec data to libavcodec
Closes: #4254
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e2fb53928bdc4651b6806982acf8088fb889dc1d
---
modules/demux/real.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/demux/real.c b/modules/demux/real.c
index f3ae35e..c9d8b7c 100644
--- a/modules/demux/real.c
+++ b/modules/demux/real.c
@@ -1377,12 +1377,12 @@ static int CodecVideoParse( demux_t *p_demux, int i_tk_id, const uint8_t *p_data
fmt.video.i_frame_rate = (GetWBE( &p_data[22] ) << 16) | GetWBE( &p_data[24] );
fmt.video.i_frame_rate_base = 1 << 16;
- fmt.i_extra = 8;
- fmt.p_extra = malloc( 8 );
+ fmt.i_extra = i_data - 26;
+ fmt.p_extra = malloc( fmt.i_extra );
if( !fmt.p_extra )
return VLC_ENOMEM;
- memcpy( fmt.p_extra, &p_data[26], 8 );
+ memcpy( fmt.p_extra, &p_data[26], fmt.i_extra );
//msg_Dbg( p_demux, " - video 0x%08x 0x%08x", dw0, dw1 );
More information about the vlc-commits
mailing list