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
e5c29287
Commit
e5c29287
authored
Sep 05, 2007
by
David Conrad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Indentation
Originally committed as revision 10384 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ac9e1177
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
matroskaenc.c
libavformat/matroskaenc.c
+22
-22
No files found.
libavformat/matroskaenc.c
View file @
e5c29287
...
...
@@ -772,29 +772,29 @@ static int mkv_write_trailer(AVFormatContext *s)
end_ebml_master
(
pb
,
mkv
->
cluster
);
if
(
!
url_is_streamed
(
pb
))
{
cuespos
=
mkv_write_cues
(
pb
,
mkv
->
cues
,
s
->
nb_streams
);
second_seekhead
=
mkv_write_seekhead
(
pb
,
mkv
->
cluster_seekhead
);
cuespos
=
mkv_write_cues
(
pb
,
mkv
->
cues
,
s
->
nb_streams
);
second_seekhead
=
mkv_write_seekhead
(
pb
,
mkv
->
cluster_seekhead
);
ret
=
mkv_add_seekhead_entry
(
mkv
->
main_seekhead
,
MATROSKA_ID_CUES
,
cuespos
);
if
(
ret
<
0
)
return
ret
;
ret
=
mkv_add_seekhead_entry
(
mkv
->
main_seekhead
,
MATROSKA_ID_SEEKHEAD
,
second_seekhead
);
if
(
ret
<
0
)
return
ret
;
mkv_write_seekhead
(
pb
,
mkv
->
main_seekhead
);
// update the duration
av_log
(
s
,
AV_LOG_DEBUG
,
"end duration = %"
PRIu64
"
\n
"
,
mkv
->
duration
);
currentpos
=
url_ftell
(
pb
);
url_fseek
(
pb
,
mkv
->
duration_offset
,
SEEK_SET
);
put_ebml_float
(
pb
,
MATROSKA_ID_DURATION
,
mkv
->
duration
);
// write the md5sum of some frames as the segment UID
if
(
!
(
s
->
streams
[
0
]
->
codec
->
flags
&
CODEC_FLAG_BITEXACT
))
{
uint8_t
segment_uid
[
16
];
av_md5_final
(
mkv
->
md5_ctx
,
segment_uid
);
url_fseek
(
pb
,
mkv
->
segment_uid
,
SEEK_SET
);
put_ebml_binary
(
pb
,
MATROSKA_ID_SEGMENTUID
,
segment_uid
,
16
);
}
url_fseek
(
pb
,
currentpos
,
SEEK_SET
);
ret
=
mkv_add_seekhead_entry
(
mkv
->
main_seekhead
,
MATROSKA_ID_CUES
,
cuespos
);
if
(
ret
<
0
)
return
ret
;
ret
=
mkv_add_seekhead_entry
(
mkv
->
main_seekhead
,
MATROSKA_ID_SEEKHEAD
,
second_seekhead
);
if
(
ret
<
0
)
return
ret
;
mkv_write_seekhead
(
pb
,
mkv
->
main_seekhead
);
// update the duration
av_log
(
s
,
AV_LOG_DEBUG
,
"end duration = %"
PRIu64
"
\n
"
,
mkv
->
duration
);
currentpos
=
url_ftell
(
pb
);
url_fseek
(
pb
,
mkv
->
duration_offset
,
SEEK_SET
);
put_ebml_float
(
pb
,
MATROSKA_ID_DURATION
,
mkv
->
duration
);
// write the md5sum of some frames as the segment UID
if
(
!
(
s
->
streams
[
0
]
->
codec
->
flags
&
CODEC_FLAG_BITEXACT
))
{
uint8_t
segment_uid
[
16
];
av_md5_final
(
mkv
->
md5_ctx
,
segment_uid
);
url_fseek
(
pb
,
mkv
->
segment_uid
,
SEEK_SET
);
put_ebml_binary
(
pb
,
MATROSKA_ID_SEGMENTUID
,
segment_uid
,
16
);
}
url_fseek
(
pb
,
currentpos
,
SEEK_SET
);
}
end_ebml_master
(
pb
,
mkv
->
segment
);
...
...
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