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
e472ea34
Commit
e472ea34
authored
Apr 13, 2009
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reindent
Originally committed as revision 18480 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
8fa0ae06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
utils.c
libavformat/utils.c
+26
-26
No files found.
libavformat/utils.c
View file @
e472ea34
...
...
@@ -1848,34 +1848,34 @@ static int try_decode_frame(AVStream *st, AVPacket *avpkt)
int
got_picture
,
data_size
,
ret
=
0
;
AVFrame
picture
;
if
(
!
st
->
codec
->
codec
){
codec
=
avcodec_find_decoder
(
st
->
codec
->
codec_id
);
if
(
!
codec
)
return
-
1
;
ret
=
avcodec_open
(
st
->
codec
,
codec
);
if
(
ret
<
0
)
return
ret
;
}
if
(
!
st
->
codec
->
codec
){
codec
=
avcodec_find_decoder
(
st
->
codec
->
codec_id
);
if
(
!
codec
)
return
-
1
;
ret
=
avcodec_open
(
st
->
codec
,
codec
);
if
(
ret
<
0
)
return
ret
;
}
if
(
!
has_codec_parameters
(
st
->
codec
)){
switch
(
st
->
codec
->
codec_type
)
{
case
CODEC_TYPE_VIDEO
:
ret
=
avcodec_decode_video2
(
st
->
codec
,
&
picture
,
&
got_picture
,
avpkt
);
break
;
case
CODEC_TYPE_AUDIO
:
data_size
=
FFMAX
(
avpkt
->
size
,
AVCODEC_MAX_AUDIO_FRAME_SIZE
);
samples
=
av_malloc
(
data_size
);
if
(
!
samples
)
goto
fail
;
ret
=
avcodec_decode_audio3
(
st
->
codec
,
samples
,
&
data_size
,
avpkt
);
av_free
(
samples
);
break
;
default
:
break
;
if
(
!
has_codec_parameters
(
st
->
codec
)){
switch
(
st
->
codec
->
codec_type
)
{
case
CODEC_TYPE_VIDEO
:
ret
=
avcodec_decode_video2
(
st
->
codec
,
&
picture
,
&
got_picture
,
avpkt
);
break
;
case
CODEC_TYPE_AUDIO
:
data_size
=
FFMAX
(
avpkt
->
size
,
AVCODEC_MAX_AUDIO_FRAME_SIZE
);
samples
=
av_malloc
(
data_size
);
if
(
!
samples
)
goto
fail
;
ret
=
avcodec_decode_audio3
(
st
->
codec
,
samples
,
&
data_size
,
avpkt
);
av_free
(
samples
);
break
;
default
:
break
;
}
}
}
fail
:
return
ret
;
}
...
...
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