Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
540107f5
Commit
540107f5
authored
Apr 25, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*ffmpeg: split huge audio packets as aout didn't like them.
parent
bfefedf7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
16 deletions
+31
-16
modules/codec/ffmpeg/audio.c
modules/codec/ffmpeg/audio.c
+31
-16
No files found.
modules/codec/ffmpeg/audio.c
View file @
540107f5
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* audio.c: audio decoder using ffmpeg library
* audio.c: audio decoder using ffmpeg library
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* Copyright (C) 1999-2001 VideoLAN
* $Id: audio.c,v 1.1
6 2003/04/20 11:57:13 gbazin
Exp $
* $Id: audio.c,v 1.1
7 2003/04/25 17:35:52 fenrir
Exp $
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
...
@@ -167,6 +167,8 @@ void E_( DecodeThread_Audio )( adec_thread_t *p_adec )
...
@@ -167,6 +167,8 @@ void E_( DecodeThread_Audio )( adec_thread_t *p_adec )
int
i_frame_size
;
int
i_frame_size
;
int
i_used
;
int
i_used
;
uint8_t
*
p
;
do
do
{
{
input_ExtractPES
(
p_adec
->
p_fifo
,
&
p_pes
);
input_ExtractPES
(
p_adec
->
p_fifo
,
&
p_pes
);
...
@@ -296,9 +298,16 @@ usenextdata:
...
@@ -296,9 +298,16 @@ usenextdata:
return
;
return
;
}
}
p
=
&
p_adec
->
p_output
[
0
];
while
(
i_samplesperchannel
>
0
)
{
int
i_samples
;
i_samples
=
__MIN
(
1000
,
i_samplesperchannel
);
p_aout_buffer
=
aout_DecNewBuffer
(
p_adec
->
p_aout
,
p_aout_buffer
=
aout_DecNewBuffer
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
,
p_adec
->
p_aout_input
,
i_samplesperchannel
);
i_samples
);
if
(
!
p_aout_buffer
)
if
(
!
p_aout_buffer
)
{
{
msg_Err
(
p_adec
->
p_fifo
,
"cannot get aout buffer"
);
msg_Err
(
p_adec
->
p_fifo
,
"cannot get aout buffer"
);
...
@@ -308,13 +317,19 @@ usenextdata:
...
@@ -308,13 +317,19 @@ usenextdata:
p_aout_buffer
->
start_date
=
aout_DateGet
(
&
p_adec
->
date
);
p_aout_buffer
->
start_date
=
aout_DateGet
(
&
p_adec
->
date
);
p_aout_buffer
->
end_date
=
aout_DateIncrement
(
&
p_adec
->
date
,
p_aout_buffer
->
end_date
=
aout_DateIncrement
(
&
p_adec
->
date
,
i_samplesperchannel
);
i_samples
);
memcpy
(
p_aout_buffer
->
p_buffer
,
memcpy
(
p_aout_buffer
->
p_buffer
,
p_adec
->
p_output
,
p
,
p_aout_buffer
->
i_nb_bytes
);
p_aout_buffer
->
i_nb_bytes
);
aout_DecPlay
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
,
p_aout_buffer
);
aout_DecPlay
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
,
p_aout_buffer
);
p
+=
i_samples
*
2
*
aout_FormatNbChannels
(
&
p_adec
->
output_format
);
i_samplesperchannel
-=
i_samples
;
// msg_Dbg( p_adec->p_fifo, "p_aout_buffer->i_nb_bytes=%d c*2*i_samples=%d", p_aout_buffer->i_nb_bytes, i_samples * 2 * aout_FormatNbChannels( &p_adec->output_format ) );
}
if
(
i_frame_size
>
0
)
if
(
i_frame_size
>
0
)
{
{
goto
usenextdata
;
goto
usenextdata
;
...
...
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