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
25c8c4c9
Commit
25c8c4c9
authored
Feb 16, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: fix mpeg2 handling.
parent
c4f86070
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
89 deletions
+73
-89
modules/codec/mpeg_audio.c
modules/codec/mpeg_audio.c
+10
-12
modules/demux/mpeg/audio.c
modules/demux/mpeg/audio.c
+63
-77
No files found.
modules/codec/mpeg_audio.c
View file @
25c8c4c9
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* mpeg_audio.c: parse MPEG audio sync info and packetize the stream
* mpeg_audio.c: parse MPEG audio sync info and packetize the stream
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* Copyright (C) 2001-2003 VideoLAN
* $Id: mpeg_audio.c,v 1.
9 2003/01/28 23:55:57 massiot
Exp $
* $Id: mpeg_audio.c,v 1.
10 2003/02/16 08:56:24 fenrir
Exp $
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
* Eric Petit <titer@videolan.org>
...
@@ -436,7 +436,7 @@ static int SyncInfo( uint32_t i_header, unsigned int * pi_channels,
...
@@ -436,7 +436,7 @@ static int SyncInfo( uint32_t i_header, unsigned int * pi_channels,
320
,
384
,
0
},
320
,
384
,
0
},
/* v1 l3 */
/* v1 l3 */
{
0
,
32
,
40
,
48
,
56
,
64
,
80
,
96
,
112
,
128
,
160
,
192
,
224
,
{
0
,
32
,
40
,
48
,
56
,
64
,
80
,
96
,
112
,
128
,
160
,
192
,
224
,
256
,
320
,
0
}
256
,
320
,
0
}
},
},
{
{
...
@@ -448,7 +448,7 @@ static int SyncInfo( uint32_t i_header, unsigned int * pi_channels,
...
@@ -448,7 +448,7 @@ static int SyncInfo( uint32_t i_header, unsigned int * pi_channels,
144
,
160
,
0
},
144
,
160
,
0
},
/* v2 l3 */
/* v2 l3 */
{
0
,
8
,
16
,
24
,
32
,
40
,
48
,
56
,
64
,
80
,
96
,
112
,
128
,
{
0
,
8
,
16
,
24
,
32
,
40
,
48
,
56
,
64
,
80
,
96
,
112
,
128
,
144
,
160
,
0
}
144
,
160
,
0
}
}
}
};
};
...
@@ -507,29 +507,27 @@ static int SyncInfo( uint32_t i_header, unsigned int * pi_channels,
...
@@ -507,29 +507,27 @@ static int SyncInfo( uint32_t i_header, unsigned int * pi_channels,
switch
(
*
pi_layer
)
switch
(
*
pi_layer
)
{
{
case
1
:
case
1
:
i_current_frame_size
=
(
(
i_version
?
6000
:
12000
)
*
i_current_frame_size
=
(
12000
*
*
pi_bit_rate
/
*
pi_sample_rate
*
pi_bit_rate
/
*
pi_sample_rate
+
b_padding
)
*
4
;
+
b_padding
)
*
4
;
*
pi_frame_size
=
(
(
i_version
?
6000
:
12000
)
*
*
pi_frame_size
=
(
12000
*
i_max_bit_rate
/
*
pi_sample_rate
+
1
)
*
4
;
i_max_bit_rate
/
*
pi_sample_rate
+
1
)
*
4
;
*
pi_frame_length
=
384
;
*
pi_frame_length
=
384
;
break
;
break
;
case
2
:
case
2
:
i_current_frame_size
=
(
i_version
?
72000
:
144000
)
*
i_current_frame_size
=
144000
*
*
pi_bit_rate
/
*
pi_sample_rate
*
pi_bit_rate
/
*
pi_sample_rate
+
b_padding
;
+
b_padding
;
*
pi_frame_size
=
(
i_version
?
72000
:
144000
)
*
*
pi_frame_size
=
144000
*
i_max_bit_rate
/
*
pi_sample_rate
+
1
;
i_max_bit_rate
/
*
pi_sample_rate
+
1
;
*
pi_frame_length
=
1152
;
*
pi_frame_length
=
1152
;
break
;
break
;
case
3
:
case
3
:
i_current_frame_size
=
(
i_version
?
72000
:
144000
)
*
i_current_frame_size
=
144000
*
*
pi_bit_rate
/
*
pi_sample_rate
*
pi_bit_rate
/
*
pi_sample_rate
+
b_padding
;
+
b_padding
;
*
pi_frame_size
=
(
i_version
?
72000
:
144000
)
*
*
pi_frame_size
=
144000
*
i_max_bit_rate
/
*
pi_sample_rate
+
1
;
i_max_bit_rate
/
*
pi_sample_rate
+
1
;
*
pi_frame_length
=
i_version
?
576
:
1152
;
*
pi_frame_length
=
i_version
?
576
:
1152
;
break
;
break
;
...
@@ -541,7 +539,7 @@ static int SyncInfo( uint32_t i_header, unsigned int * pi_channels,
...
@@ -541,7 +539,7 @@ static int SyncInfo( uint32_t i_header, unsigned int * pi_channels,
{
{
return
-
1
;
return
-
1
;
}
}
return
i_current_frame_size
;
return
i_current_frame_size
;
}
}
modules/demux/mpeg/audio.c
View file @
25c8c4c9
This diff is collapsed.
Click to expand it.
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