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
71852a1b
Commit
71852a1b
authored
May 04, 2016
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
matroskaenc: Provide output bytestream markers
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
dbbaad32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
matroskaenc.c
libavformat/matroskaenc.c
+7
-0
No files found.
libavformat/matroskaenc.c
View file @
71852a1b
...
...
@@ -105,6 +105,7 @@ typedef struct MatroskaMuxContext {
AVPacket
cur_audio_pkt
;
int
have_attachments
;
int
have_video
;
int
reserve_cues_space
;
int
cluster_size_limit
;
...
...
@@ -843,6 +844,7 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
switch
(
par
->
codec_type
)
{
case
AVMEDIA_TYPE_VIDEO
:
mkv
->
have_video
=
1
;
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKTYPE
,
MATROSKA_TRACK_TYPE_VIDEO
);
if
(
st
->
avg_frame_rate
.
num
>
0
&&
st
->
avg_frame_rate
.
den
>
0
)
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKDEFAULTDURATION
,
1E9
/
av_q2d
(
st
->
avg_frame_rate
));
...
...
@@ -1635,6 +1637,11 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_flush
(
s
->
pb
);
}
if
(
!
mkv
->
cluster_pos
)
avio_write_marker
(
s
->
pb
,
av_rescale_q
(
pkt
->
dts
,
s
->
streams
[
pkt
->
stream_index
]
->
time_base
,
AV_TIME_BASE_Q
),
keyframe
&&
(
mkv
->
have_video
?
codec_type
==
AVMEDIA_TYPE_VIDEO
:
1
)
?
AVIO_DATA_MARKER_SYNC_POINT
:
AVIO_DATA_MARKER_BOUNDARY_POINT
);
// check if we have an audio packet cached
if
(
mkv
->
cur_audio_pkt
.
size
>
0
)
{
ret
=
mkv_write_packet_internal
(
s
,
&
mkv
->
cur_audio_pkt
);
...
...
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