Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
463c16f6
Commit
463c16f6
authored
Feb 18, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* raah, corrected mpeg2-layer3 playback (and streaming). (that my last
fix had broken :p )
parent
b35bd95c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
10 deletions
+25
-10
modules/codec/mpeg_audio.c
modules/codec/mpeg_audio.c
+9
-5
modules/demux/mpeg/audio.c
modules/demux/mpeg/audio.c
+10
-2
modules/packetizer/mpegaudio.c
modules/packetizer/mpegaudio.c
+6
-3
No files found.
modules/codec/mpeg_audio.c
View file @
463c16f6
...
...
@@ -2,7 +2,7 @@
* mpeg_audio.c: parse MPEG audio sync info and packetize the stream
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: mpeg_audio.c,v 1.1
0 2003/02/16 08:56:24
fenrir Exp $
* $Id: mpeg_audio.c,v 1.1
1 2003/02/18 00:51:40
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
...
...
@@ -203,6 +203,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
if
(
p_dec
->
p_fifo
->
b_die
||
p_dec
->
p_fifo
->
b_error
)
break
;
/* Set the Presentation Time Stamp */
fprintf
(
stderr
,
"mpgadec pts:%lld
\n
"
,
pts
);
if
(
pts
!=
0
&&
pts
!=
aout_DateGet
(
&
end_date
)
)
{
aout_DateSet
(
&
end_date
,
pts
);
...
...
@@ -288,6 +289,7 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
byte_t
p_junk
[
MAX_FRAME_SIZE
];
int
i_skip
=
i_current_frame_size
-
MAD_BUFFER_GUARD
;
fprintf
(
stderr
,
"waiting pts
\n
"
);
/* We've just started the stream, wait for the first PTS. */
while
(
i_skip
>
0
)
{
...
...
@@ -390,7 +392,9 @@ static int RunDecoder( decoder_fifo_t *p_fifo )
p_buffer
->
i_nb_bytes
=
i_current_frame_size
+
MAD_BUFFER_GUARD
;
/* Send the buffer to the aout core. */
fprintf
(
stderr
,
"sending.."
);
aout_DecPlay
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
,
p_buffer
);
fprintf
(
stderr
,
"..done
\n
"
);
}
if
(
p_dec
->
p_fifo
->
b_error
)
...
...
@@ -524,10 +528,10 @@ static int SyncInfo( uint32_t i_header, unsigned int * pi_channels,
break
;
case
3
:
i_current_frame_size
=
144000
*
*
pi_bit_rate
/
*
pi_sample_rate
+
b_padding
;
*
pi_frame_size
=
144000
*
i_max_bit_rate
/
*
pi_sample_rate
+
1
;
i_current_frame_size
=
(
i_version
?
72000
:
144000
)
*
*
pi_bit_rate
/
*
pi_sample_rate
+
b_padding
;
*
pi_frame_size
=
(
i_version
?
72000
:
144000
)
*
i_max_bit_rate
/
*
pi_sample_rate
+
1
;
*
pi_frame_length
=
i_version
?
576
:
1152
;
break
;
...
...
modules/demux/mpeg/audio.c
View file @
463c16f6
...
...
@@ -2,7 +2,7 @@
* audio.c : mpeg audio Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: audio.c,v 1.1
2 2003/02/16 08:56:24
fenrir Exp $
* $Id: audio.c,v 1.1
3 2003/02/18 00:51:40
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -429,11 +429,19 @@ static void ExtractConfiguration( demux_sys_t *p_demux )
p_demux
->
i_framelength
=
(
(
12000
*
p_demux
->
mpeg
.
i_bitrate
)
/
p_demux
->
mpeg
.
i_samplerate
+
p_demux
->
mpeg
.
i_padding
)
*
4
;
break
;
case
(
1
):
case
(
2
):
p_demux
->
i_framelength
=
(
144000
*
p_demux
->
mpeg
.
i_bitrate
)
/
p_demux
->
mpeg
.
i_samplerate
+
p_demux
->
mpeg
.
i_padding
;
break
;
case
(
2
):
p_demux
->
i_framelength
=
(
p_demux
->
mpeg
.
i_version
?
72000
:
144000
)
*
p_demux
->
mpeg
.
i_bitrate
/
p_demux
->
mpeg
.
i_samplerate
+
p_demux
->
mpeg
.
i_padding
;
break
;
}
}
...
...
modules/packetizer/mpegaudio.c
View file @
463c16f6
...
...
@@ -2,7 +2,7 @@
* mpegaudio.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mpegaudio.c,v 1.
2 2002/12/18 01:34:44
fenrir Exp $
* $Id: mpegaudio.c,v 1.
3 2003/02/18 00:51:40
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
...
...
@@ -260,10 +260,13 @@ static void PacketizeThread( packetizer_t *p_pack )
switch
(
i_layer
)
{
case
0
:
i_framelength
=
(
(
i_version
?
6000
:
12000
)
*
i_bitrate
/
i_samplerate
+
i_padding
)
*
4
;
i_framelength
=
(
12000
*
i_bitrate
/
i_samplerate
+
i_padding
)
*
4
;
break
;
case
1
:
i_framelength
=
144000
*
i_bitrate
/
i_samplerate
+
i_padding
;
break
;
case
2
:
i_framelength
=
(
i_version
?
72000
:
144000
)
*
i_bitrate
/
i_samplerate
+
i_padding
;
...
...
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