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
8a091955
Commit
8a091955
authored
Jul 28, 2013
by
Matthieu Bouron
Committed by
Michael Niedermayer
Jul 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/movenc: improve psp check
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ee4ef139
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
movenc.c
libavformat/movenc.c
+12
-1
No files found.
libavformat/movenc.c
View file @
8a091955
...
...
@@ -3557,7 +3557,18 @@ static int mov_write_header(AVFormatContext *s)
mov_write_ftyp_tag
(
pb
,
s
);
if
(
mov
->
mode
==
MODE_PSP
)
{
if
(
s
->
nb_streams
!=
2
)
{
int
video_streams_nb
=
0
,
audio_streams_nb
=
0
,
other_streams_nb
=
0
;
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
AVStream
*
st
=
s
->
streams
[
i
];
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
video_streams_nb
++
;
else
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
)
audio_streams_nb
++
;
else
other_streams_nb
++
;
}
if
(
video_streams_nb
!=
1
||
audio_streams_nb
!=
1
||
other_streams_nb
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"PSP mode need one video and one audio stream
\n
"
);
return
-
1
;
}
...
...
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