Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
5343b969
Commit
5343b969
authored
May 13, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mpeg_audio.c : don't use any more U32_AT. Thanks Meuuh.
parent
4bef8ffb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
plugins/mpeg_system/mpeg_audio.c
plugins/mpeg_system/mpeg_audio.c
+18
-7
No files found.
plugins/mpeg_system/mpeg_audio.c
View file @
5343b969
...
...
@@ -2,7 +2,7 @@
* mpeg_audio.c : mpeg_audio Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mpeg_audio.c,v 1.
1 2002/05/10 02:04:17
fenrir Exp $
* $Id: mpeg_audio.c,v 1.
2 2002/05/13 16:28:44
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -154,6 +154,17 @@ static char* mpegaudio_mode[4] =
"stereo"
,
"joint stereo"
,
"dual channel"
,
"mono"
};
static
__inline__
u32
__GetDWBE
(
byte_t
*
p_buff
)
{
return
(
(
(
*
(
p_buff
))
<<
24
)
+
(
(
*
(
p_buff
+
1
))
<<
16
)
+
(
(
*
(
p_buff
+
2
))
<<
8
)
+
(
(
*
(
p_buff
+
3
))
)
);
}
/*
#define __GetDWBE( p_buff ) \
( ( (*(p_buff)) << 24 ) + ( (*(p_buff+1)) << 16 ) + \
( (*(p_buff+2)) << 8 ) + ( (*(p_buff+3)) ) )
*/
/*****************************************************************************
* MPEGAudio_CheckHeader : Test the validity of the header
*****************************************************************************/
...
...
@@ -250,13 +261,13 @@ static int MPEGAudio_FindFrame( input_thread_t *p_input,
while
(
i_pos
+
4
<=
i_size
)
/* need at least 4 bytes */
{
i_header
=
U32_AT
(
p_buff
);
i_header
=
__GetDWBE
(
p_buff
);
if
(
MPEGAudio_CheckHeader
(
i_header
)
)
{
MPEGAudio_ParseHeader
(
i_header
,
p_mpeg
);
i_framesize
=
MPEGAudio_FrameSize
(
p_mpeg
);
if
(
(
i_pos
+
i_framesize
+
4
>
i_size
)
||
(
MPEGAudio_CheckHeader
(
U32_AT
(
p_buff
+
i_framesize
)
)
)
)
||
(
MPEGAudio_CheckHeader
(
__GetDWBE
(
p_buff
+
i_framesize
)
)
)
)
{
*
pi_pos
=
i_pos
;
return
(
1
);
...
...
@@ -315,17 +326,17 @@ static void MPEGAudio_ExtractXingHeader( input_thread_t *p_input,
}
p_buff
+=
4
;
p_xh
->
i_flags
=
U32_AT
(
p_buff
);
p_xh
->
i_flags
=
__GetDWBE
(
p_buff
);
p_buff
+=
4
;
if
(
p_xh
->
i_flags
&
FRAMES_FLAG
)
{
p_xh
->
i_frames
=
U32_AT
(
p_buff
);
p_xh
->
i_frames
=
__GetDWBE
(
p_buff
);
p_buff
+=
4
;
}
if
(
p_xh
->
i_flags
&
BYTES_FLAG
)
{
p_xh
->
i_bytes
=
U32_AT
(
p_buff
);
p_xh
->
i_bytes
=
__GetDWBE
(
p_buff
);
p_buff
+=
4
;
}
if
(
p_xh
->
i_flags
&
TOC_FLAG
)
...
...
@@ -335,7 +346,7 @@ static void MPEGAudio_ExtractXingHeader( input_thread_t *p_input,
}
if
(
p_xh
->
i_flags
&
VBR_SCALE_FLAG
)
{
p_xh
->
i_vbr_scale
=
U32_AT
(
p_buff
);
p_xh
->
i_vbr_scale
=
__GetDWBE
(
p_buff
);
p_buff
+=
4
;
}
if
(
(
p_xh
->
i_flags
&
FRAMES_FLAG
)
&&
(
p_xh
->
i_flags
&
BYTES_FLAG
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment