Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
3fdb6af9
Commit
3fdb6af9
authored
Feb 27, 2007
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use avcodec_decode_audio2
Originally committed as revision 8146 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ee5db69e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
utils.c
libavformat/utils.c
+5
-4
No files found.
libavformat/utils.c
View file @
3fdb6af9
...
...
@@ -1750,7 +1750,7 @@ static int try_decode_frame(AVStream *st, const uint8_t *data, int size)
{
int16_t
*
samples
;
AVCodec
*
codec
;
int
got_picture
,
ret
=
0
;
int
got_picture
,
data_size
,
ret
=
0
;
AVFrame
picture
;
if
(
!
st
->
codec
->
codec
){
...
...
@@ -1769,11 +1769,12 @@ static int try_decode_frame(AVStream *st, const uint8_t *data, int size)
&
got_picture
,
(
uint8_t
*
)
data
,
size
);
break
;
case
CODEC_TYPE_AUDIO
:
samples
=
av_malloc
(
AVCODEC_MAX_AUDIO_FRAME_SIZE
);
data_size
=
FFMAX
(
size
,
AVCODEC_MAX_AUDIO_FRAME_SIZE
);
samples
=
av_malloc
(
data_size
);
if
(
!
samples
)
goto
fail
;
ret
=
avcodec_decode_audio
(
st
->
codec
,
samples
,
&
got_pictur
e
,
(
uint8_t
*
)
data
,
size
);
ret
=
avcodec_decode_audio
2
(
st
->
codec
,
samples
,
&
data_siz
e
,
(
uint8_t
*
)
data
,
size
);
av_free
(
samples
);
break
;
default
:
...
...
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