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
15c14ce6
Commit
15c14ce6
authored
Aug 11, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
matroskaenc: implement query_codec()
parent
48f9e457
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
matroskaenc.c
libavformat/matroskaenc.c
+17
-0
No files found.
libavformat/matroskaenc.c
View file @
15c14ce6
...
...
@@ -1191,6 +1191,22 @@ static int mkv_write_trailer(AVFormatContext *s)
return
0
;
}
static
int
mkv_query_codec
(
enum
CodecID
codec_id
,
int
std_compliance
)
{
int
i
;
for
(
i
=
0
;
ff_mkv_codec_tags
[
i
].
id
!=
CODEC_ID_NONE
;
i
++
)
if
(
ff_mkv_codec_tags
[
i
].
id
==
codec_id
)
return
1
;
if
(
std_compliance
<
FF_COMPLIANCE_NORMAL
)
{
// mkv theoretically supports any
enum
AVMediaType
type
=
avcodec_get_type
(
codec_id
);
// video/audio through VFW/ACM
if
(
type
==
AVMEDIA_TYPE_VIDEO
||
type
==
AVMEDIA_TYPE_AUDIO
)
return
1
;
}
return
0
;
}
#if CONFIG_MATROSKA_MUXER
AVOutputFormat
ff_matroska_muxer
=
{
.
name
=
"matroska"
,
...
...
@@ -1206,6 +1222,7 @@ AVOutputFormat ff_matroska_muxer = {
.
flags
=
AVFMT_GLOBALHEADER
|
AVFMT_VARIABLE_FPS
,
.
codec_tag
=
(
const
AVCodecTag
*
const
[]){
ff_codec_bmp_tags
,
ff_codec_wav_tags
,
0
},
.
subtitle_codec
=
CODEC_ID_SSA
,
.
query_codec
=
mkv_query_codec
,
};
#endif
...
...
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