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
8bc4accc
Commit
8bc4accc
authored
Mar 22, 2016
by
wm4
Committed by
Anton Khirnov
Mar 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: use new decode API
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
35846d93
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
utils.c
libavformat/utils.c
+12
-12
No files found.
libavformat/utils.c
View file @
8bc4accc
...
...
@@ -1945,22 +1945,22 @@ FF_ENABLE_DEPRECATION_WARNINGS
(
!
st
->
codec_info_nb_frames
&&
(
avctx
->
codec
->
capabilities
&
AV_CODEC_CAP_CHANNEL_CONF
))))
{
got_picture
=
0
;
switch
(
avctx
->
codec_type
)
{
case
AVMEDIA_TYPE_VIDEO
:
ret
=
avcodec_decode_video2
(
avctx
,
frame
,
&
got_picture
,
&
pkt
);
break
;
case
AVMEDIA_TYPE_AUDIO
:
ret
=
avcodec_decode_audio4
(
avctx
,
frame
,
&
got_picture
,
&
pkt
);
break
;
default
:
if
(
avctx
->
codec_type
==
AVMEDIA_TYPE_VIDEO
||
avctx
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
{
ret
=
avcodec_send_packet
(
avctx
,
&
pkt
);
if
(
ret
<
0
&&
ret
!=
AVERROR
(
EAGAIN
)
&&
ret
!=
AVERROR_EOF
)
break
;
if
(
ret
>=
0
)
pkt
.
size
=
0
;
ret
=
avcodec_receive_frame
(
avctx
,
frame
);
if
(
ret
>=
0
)
got_picture
=
1
;
if
(
ret
==
AVERROR
(
EAGAIN
)
||
ret
==
AVERROR_EOF
)
ret
=
0
;
}
if
(
ret
>=
0
)
{
if
(
got_picture
)
st
->
info
->
nb_decoded_frames
++
;
pkt
.
data
+=
ret
;
pkt
.
size
-=
ret
;
ret
=
got_picture
;
}
}
...
...
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