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
91f35929
Commit
91f35929
authored
Jan 30, 2013
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly mark non-default streams when muxing matroska.
Fixes ticket #1815. Reviewed-by: Hendrik Leppkes
parent
71f8d704
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
matroskaenc.c
libavformat/matroskaenc.c
+7
-2
No files found.
libavformat/matroskaenc.c
View file @
91f35929
...
...
@@ -530,12 +530,16 @@ static int mkv_write_tracks(AVFormatContext *s)
MatroskaMuxContext
*
mkv
=
s
->
priv_data
;
AVIOContext
*
pb
=
s
->
pb
;
ebml_master
tracks
;
int
i
,
j
,
ret
;
int
i
,
j
,
ret
,
default_stream_exists
=
0
;
ret
=
mkv_add_seekhead_entry
(
mkv
->
main_seekhead
,
MATROSKA_ID_TRACKS
,
avio_tell
(
pb
));
if
(
ret
<
0
)
return
ret
;
tracks
=
start_ebml_master
(
pb
,
MATROSKA_ID_TRACKS
,
0
);
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
AVStream
*
st
=
s
->
streams
[
i
];
default_stream_exists
|=
st
->
disposition
&
AV_DISPOSITION_DEFAULT
;
}
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
AVStream
*
st
=
s
->
streams
[
i
];
AVCodecContext
*
codec
=
st
->
codec
;
...
...
@@ -570,8 +574,9 @@ static int mkv_write_tracks(AVFormatContext *s)
tag
=
av_dict_get
(
st
->
metadata
,
"language"
,
NULL
,
0
);
put_ebml_string
(
pb
,
MATROSKA_ID_TRACKLANGUAGE
,
tag
?
tag
->
value
:
"und"
);
if
(
st
->
disposition
)
if
(
default_stream_exists
)
{
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKFLAGDEFAULT
,
!!
(
st
->
disposition
&
AV_DISPOSITION_DEFAULT
));
}
if
(
st
->
disposition
&
AV_DISPOSITION_FORCED
)
put_ebml_uint
(
pb
,
MATROSKA_ID_TRACKFLAGFORCED
,
1
);
...
...
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