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
355d01a1
Commit
355d01a1
authored
Dec 18, 2014
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movenc: Factorize writing ftyp and other identification tags to a separate function
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
8d54bacb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
movenc.c
libavformat/movenc.c
+17
-9
No files found.
libavformat/movenc.c
View file @
355d01a1
...
...
@@ -2988,6 +2988,20 @@ static void mov_write_uuidprof_tag(AVIOContext *pb, AVFormatContext *s)
avio_wb32
(
pb
,
0x010001
);
/* ? */
}
static
int
mov_write_identification
(
AVIOContext
*
pb
,
AVFormatContext
*
s
)
{
MOVMuxContext
*
mov
=
s
->
priv_data
;
mov_write_ftyp_tag
(
pb
,
s
);
if
(
mov
->
mode
==
MODE_PSP
)
{
if
(
s
->
nb_streams
!=
2
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"PSP mode need one video and one audio stream
\n
"
);
return
AVERROR
(
EINVAL
);
}
mov_write_uuidprof_tag
(
pb
,
s
);
}
return
0
;
}
static
int
mov_parse_mpeg2_frame
(
AVPacket
*
pkt
,
uint32_t
*
flags
)
{
uint32_t
c
=
-
1
;
...
...
@@ -3605,7 +3619,7 @@ static int mov_write_header(AVFormatContext *s)
AVIOContext
*
pb
=
s
->
pb
;
MOVMuxContext
*
mov
=
s
->
priv_data
;
AVDictionaryEntry
*
t
;
int
i
,
hint_track
=
0
;
int
i
,
ret
,
hint_track
=
0
;
mov
->
fc
=
s
;
...
...
@@ -3664,14 +3678,8 @@ static int mov_write_header(AVFormatContext *s)
}
mov_write_ftyp_tag
(
pb
,
s
);
if
(
mov
->
mode
==
MODE_PSP
)
{
if
(
s
->
nb_streams
!=
2
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"PSP mode need one video and one audio stream
\n
"
);
return
AVERROR
(
EINVAL
);
}
mov_write_uuidprof_tag
(
pb
,
s
);
}
if
((
ret
=
mov_write_identification
(
pb
,
s
))
<
0
)
return
ret
;
mov
->
nb_streams
=
s
->
nb_streams
;
if
(
mov
->
mode
&
(
MODE_MP4
|
MODE_MOV
|
MODE_IPOD
)
&&
s
->
nb_chapters
)
...
...
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