[vlc-devel] commit: Fix type punnig breakage ( Rémi Denis-Courmont )
git version control
git at videolan.org
Fri Mar 28 16:12:06 CET 2008
vlc | branch: 0.8.6-bugfix | Rémi Denis-Courmont <rdenis at simphalempin.com> | Fri Mar 28 17:12:10 2008 +0200| [cdc0d578f791f659edd84a94b128f67e5cacb5e2]
Fix type punnig breakage
(manually backported from 39237808)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cdc0d578f791f659edd84a94b128f67e5cacb5e2
---
modules/demux/mp4/libmp4.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index f4fa6b3..1c1f5e0 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -1173,10 +1173,12 @@ static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box )
{
/* SoundDescriptionV2 */
double f_sample_rate;
+ int64_t dummy;
uint32_t i_channel;
MP4_GET4BYTES( p_box->data.p_sample_soun->i_sample_per_packet );
- MP4_GET8BYTES( (*(int64_t *)&f_sample_rate) );
+ MP4_GET8BYTES( dummy );
+ memcpy( &f_sample_rate, &dummy, 8 );
msg_Dbg( p_stream, "read box: %f Hz", f_sample_rate );
p_box->data.p_sample_soun->i_sampleratehi = (int)f_sample_rate % 65536;
More information about the vlc-devel
mailing list