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
72fe16a1
Commit
72fe16a1
authored
Sep 18, 2013
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movenc: Use null buffers for measuring the amount of data to be written
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
3627ce2f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
movenc.c
libavformat/movenc.c
+6
-12
No files found.
libavformat/movenc.c
View file @
72fe16a1
...
@@ -2443,13 +2443,11 @@ static int mov_write_moof_tag(AVIOContext *pb, MOVMuxContext *mov, int tracks)
...
@@ -2443,13 +2443,11 @@ static int mov_write_moof_tag(AVIOContext *pb, MOVMuxContext *mov, int tracks)
{
{
AVIOContext
*
avio_buf
;
AVIOContext
*
avio_buf
;
int
ret
,
moof_size
;
int
ret
,
moof_size
;
uint8_t
*
buf
;
if
((
ret
=
avio_open_dyn
_buf
(
&
avio_buf
))
<
0
)
if
((
ret
=
ffio_open_null
_buf
(
&
avio_buf
))
<
0
)
return
ret
;
return
ret
;
mov_write_moof_tag_internal
(
avio_buf
,
mov
,
tracks
,
0
);
mov_write_moof_tag_internal
(
avio_buf
,
mov
,
tracks
,
0
);
moof_size
=
avio_close_dyn_buf
(
avio_buf
,
&
buf
);
moof_size
=
ffio_close_null_buf
(
avio_buf
);
av_free
(
buf
);
return
mov_write_moof_tag_internal
(
pb
,
mov
,
tracks
,
moof_size
);
return
mov_write_moof_tag_internal
(
pb
,
mov
,
tracks
,
moof_size
);
}
}
...
@@ -2738,11 +2736,10 @@ static int mov_flush_fragment(AVFormatContext *s)
...
@@ -2738,11 +2736,10 @@ static int mov_flush_fragment(AVFormatContext *s)
if
(
i
<
mov
->
nb_streams
)
if
(
i
<
mov
->
nb_streams
)
return
0
;
return
0
;
if
((
ret
=
avio_open_dyn
_buf
(
&
moov_buf
))
<
0
)
if
((
ret
=
ffio_open_null
_buf
(
&
moov_buf
))
<
0
)
return
ret
;
return
ret
;
mov_write_moov_tag
(
moov_buf
,
mov
,
s
);
mov_write_moov_tag
(
moov_buf
,
mov
,
s
);
buf_size
=
avio_close_dyn_buf
(
moov_buf
,
&
buf
);
buf_size
=
ffio_close_null_buf
(
moov_buf
);
av_free
(
buf
);
for
(
i
=
0
;
i
<
mov
->
nb_streams
;
i
++
)
for
(
i
=
0
;
i
<
mov
->
nb_streams
;
i
++
)
mov
->
tracks
[
i
].
data_offset
=
pos
+
buf_size
+
8
;
mov
->
tracks
[
i
].
data_offset
=
pos
+
buf_size
+
8
;
...
@@ -3348,16 +3345,13 @@ static int mov_write_header(AVFormatContext *s)
...
@@ -3348,16 +3345,13 @@ static int mov_write_header(AVFormatContext *s)
static
int
get_moov_size
(
AVFormatContext
*
s
)
static
int
get_moov_size
(
AVFormatContext
*
s
)
{
{
int
ret
;
int
ret
;
uint8_t
*
buf
;
AVIOContext
*
moov_buf
;
AVIOContext
*
moov_buf
;
MOVMuxContext
*
mov
=
s
->
priv_data
;
MOVMuxContext
*
mov
=
s
->
priv_data
;
if
((
ret
=
avio_open_dyn
_buf
(
&
moov_buf
))
<
0
)
if
((
ret
=
ffio_open_null
_buf
(
&
moov_buf
))
<
0
)
return
ret
;
return
ret
;
mov_write_moov_tag
(
moov_buf
,
mov
,
s
);
mov_write_moov_tag
(
moov_buf
,
mov
,
s
);
ret
=
avio_close_dyn_buf
(
moov_buf
,
&
buf
);
return
ffio_close_null_buf
(
moov_buf
);
av_free
(
buf
);
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