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
663a5d9d
Commit
663a5d9d
authored
Sep 05, 2007
by
David Conrad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write subtitle tracks
Originally committed as revision 10330 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
95527e06
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
matroskaenc.c
libavformat/matroskaenc.c
+10
-0
No files found.
libavformat/matroskaenc.c
View file @
663a5d9d
...
@@ -475,6 +475,9 @@ static int mkv_write_tracks(AVFormatContext *s)
...
@@ -475,6 +475,9 @@ static int mkv_write_tracks(AVFormatContext *s)
end_ebml_master
(
pb
,
subinfo
);
end_ebml_master
(
pb
,
subinfo
);
break
;
break
;
case
CODEC_TYPE_SUBTITLE
:
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKTYPE
,
MATROSKA_TRACK_TYPE_SUBTITLE
);
break
;
default:
default:
av_log
(
s
,
AV_LOG_ERROR
,
"Only audio and video are supported for Matroska."
);
av_log
(
s
,
AV_LOG_ERROR
,
"Only audio and video are supported for Matroska."
);
break
;
break
;
...
@@ -583,7 +586,14 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -583,7 +586,14 @@ static int mkv_write_packet(AVFormatContext *s, AVPacket *pkt)
mkv
->
cluster_pts
=
pkt
->
pts
;
mkv
->
cluster_pts
=
pkt
->
pts
;
}
}
if
(
s
->
streams
[
pkt
->
stream_index
]
->
codec
->
codec_type
!=
CODEC_TYPE_SUBTITLE
)
{
mkv_write_block
(
s
,
MATROSKA_ID_SIMPLEBLOCK
,
pkt
,
keyframe
<<
7
);
mkv_write_block
(
s
,
MATROSKA_ID_SIMPLEBLOCK
,
pkt
,
keyframe
<<
7
);
}
else
{
offset_t
blockgroup
=
start_ebml_master
(
pb
,
MATROSKA_ID_BLOCKGROUP
);
mkv_write_block
(
s
,
MATROSKA_ID_BLOCK
,
pkt
,
0
);
put_ebml_uint
(
pb
,
MATROSKA_ID_DURATION
,
pkt
->
duration
);
end_ebml_master
(
pb
,
blockgroup
);
}
if
(
s
->
streams
[
pkt
->
stream_index
]
->
codec
->
codec_type
==
CODEC_TYPE_VIDEO
&&
keyframe
)
{
if
(
s
->
streams
[
pkt
->
stream_index
]
->
codec
->
codec_type
==
CODEC_TYPE_VIDEO
&&
keyframe
)
{
if
(
mkv_add_cuepoint
(
mkv
->
cues
,
pkt
,
mkv
->
cluster_pos
)
<
0
)
if
(
mkv_add_cuepoint
(
mkv
->
cues
,
pkt
,
mkv
->
cluster_pos
)
<
0
)
...
...
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