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
7d585bc9
Commit
7d585bc9
authored
Aug 07, 2014
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not automatically map subtitles if the decoder and encoder properties are different.
Fixes ticket #3819.
parent
0ab00a75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
ffmpeg_opt.c
ffmpeg_opt.c
+21
-2
No files found.
ffmpeg_opt.c
View file @
7d585bc9
...
@@ -1870,8 +1870,27 @@ static int open_output_file(OptionsContext *o, const char *filename)
...
@@ -1870,8 +1870,27 @@ static int open_output_file(OptionsContext *o, const char *filename)
if
(
!
o
->
subtitle_disable
&&
(
avcodec_find_encoder
(
oc
->
oformat
->
subtitle_codec
)
||
subtitle_codec_name
))
{
if
(
!
o
->
subtitle_disable
&&
(
avcodec_find_encoder
(
oc
->
oformat
->
subtitle_codec
)
||
subtitle_codec_name
))
{
for
(
i
=
0
;
i
<
nb_input_streams
;
i
++
)
for
(
i
=
0
;
i
<
nb_input_streams
;
i
++
)
if
(
input_streams
[
i
]
->
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_SUBTITLE
)
{
if
(
input_streams
[
i
]
->
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_SUBTITLE
)
{
new_subtitle_stream
(
o
,
oc
,
i
);
AVCodecDescriptor
const
*
input_descriptor
=
break
;
avcodec_descriptor_get
(
input_streams
[
i
]
->
st
->
codec
->
codec_id
);
AVCodecDescriptor
const
*
output_descriptor
=
NULL
;
AVCodec
const
*
output_codec
=
avcodec_find_encoder
(
oc
->
oformat
->
subtitle_codec
);
int
input_props
=
0
,
output_props
=
0
;
if
(
output_codec
)
output_descriptor
=
avcodec_descriptor_get
(
output_codec
->
id
);
if
(
input_descriptor
)
input_props
=
input_descriptor
->
props
&
(
AV_CODEC_PROP_TEXT_SUB
|
AV_CODEC_PROP_BITMAP_SUB
);
if
(
output_descriptor
)
output_props
=
output_descriptor
->
props
&
(
AV_CODEC_PROP_TEXT_SUB
|
AV_CODEC_PROP_BITMAP_SUB
);
if
(
subtitle_codec_name
||
input_props
&
output_props
||
// Map dvb teletext which has neither property to any output subtitle encoder
input_descriptor
&&
output_descriptor
&&
(
!
input_descriptor
->
props
||
!
output_descriptor
->
props
))
{
new_subtitle_stream
(
o
,
oc
,
i
);
break
;
}
}
}
}
}
/* do something with data? */
/* do something with data? */
...
...
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