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
256ab3ed
Commit
256ab3ed
authored
Feb 23, 2010
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dont modify wanted_stream.
Originally committed as revision 22007 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5b369983
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
ffplay.c
ffplay.c
+9
-6
No files found.
ffplay.c
View file @
256ab3ed
...
...
@@ -1980,6 +1980,7 @@ static int decode_thread(void *arg)
AVFormatContext
*
ic
;
int
err
,
i
,
ret
;
int
st_index
[
CODEC_TYPE_NB
];
int
st_count
[
CODEC_TYPE_NB
]
=
{
0
};
AVPacket
pkt1
,
*
pkt
=
&
pkt1
;
AVFormatParameters
params
,
*
ap
=
&
params
;
int
eof
=
0
;
...
...
@@ -2045,18 +2046,20 @@ static int decode_thread(void *arg)
for
(
i
=
0
;
i
<
ic
->
nb_streams
;
i
++
)
{
AVCodecContext
*
avctx
=
ic
->
streams
[
i
]
->
codec
;
ic
->
streams
[
i
]
->
discard
=
AVDISCARD_ALL
;
if
(
avctx
->
codec_type
>=
(
unsigned
)
CODEC_TYPE_NB
)
exit
(
1
);
if
(
st_count
[
avctx
->
codec_type
]
++
!=
wanted_stream
[
avctx
->
codec_type
]
&&
wanted_stream
[
avctx
->
codec_type
]
>=
0
)
continue
;
switch
(
avctx
->
codec_type
)
{
case
CODEC_TYPE_AUDIO
:
if
(
wanted_stream
[
CODEC_TYPE_AUDIO
]
--
>=
0
&&
!
audio_disable
)
if
(
!
audio_disable
)
st_index
[
CODEC_TYPE_AUDIO
]
=
i
;
break
;
case
CODEC_TYPE_VIDEO
:
if
(
wanted_stream
[
CODEC_TYPE_VIDEO
]
--
>=
0
&&
!
video_disable
)
st_index
[
CODEC_TYPE_VIDEO
]
=
i
;
break
;
case
CODEC_TYPE_SUBTITLE
:
if
(
wanted_stream
[
CODEC_TYPE_SUBTITLE
]
--
>=
0
&&
!
video_disable
)
st_index
[
CODEC_TYPE_SUBTITLE
]
=
i
;
if
(
!
video_disable
)
st_index
[
avctx
->
codec_type
]
=
i
;
break
;
default:
break
;
...
...
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