Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
8732271e
Commit
8732271e
authored
Jan 05, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: mark bitmap based subtitles codecs as such.
parent
7ca2f8b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
avcodec.h
libavcodec/avcodec.h
+4
-0
codec_desc.c
libavcodec/codec_desc.c
+4
-0
utils.c
libavcodec/utils.c
+1
-1
No files found.
libavcodec/avcodec.h
View file @
8732271e
...
...
@@ -540,6 +540,10 @@ typedef struct AVCodecDescriptor {
* Codec supports lossless compression. Audio and video codecs only.
*/
#define AV_CODEC_PROP_LOSSLESS (1 << 2)
/**
* Subtitle codec is bitmap based
*/
#define AV_CODEC_PROP_BITMAP_SUB (1 << 16)
#if FF_API_OLD_DECODE_AUDIO
/* in bytes */
...
...
libavcodec/codec_desc.c
View file @
8732271e
...
...
@@ -2371,12 +2371,14 @@ static const AVCodecDescriptor codec_descriptors[] = {
.
type
=
AVMEDIA_TYPE_SUBTITLE
,
.
name
=
"dvd_subtitle"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"DVD subtitles"
),
.
props
=
AV_CODEC_PROP_BITMAP_SUB
,
},
{
.
id
=
AV_CODEC_ID_DVB_SUBTITLE
,
.
type
=
AVMEDIA_TYPE_SUBTITLE
,
.
name
=
"dvb_subtitle"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"DVB subtitles"
),
.
props
=
AV_CODEC_PROP_BITMAP_SUB
,
},
{
.
id
=
AV_CODEC_ID_TEXT
,
...
...
@@ -2389,6 +2391,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
.
type
=
AVMEDIA_TYPE_SUBTITLE
,
.
name
=
"xsub"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"XSUB"
),
.
props
=
AV_CODEC_PROP_BITMAP_SUB
,
},
{
.
id
=
AV_CODEC_ID_SSA
,
...
...
@@ -2407,6 +2410,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
.
type
=
AVMEDIA_TYPE_SUBTITLE
,
.
name
=
"hdmv_pgs_subtitle"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"HDMV Presentation Graphic Stream subtitles"
),
.
props
=
AV_CODEC_PROP_BITMAP_SUB
,
},
{
.
id
=
AV_CODEC_ID_DVB_TELETEXT
,
...
...
libavcodec/utils.c
View file @
8732271e
...
...
@@ -1872,7 +1872,7 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
sub
->
pts
=
av_rescale_q
(
avpkt
->
pts
,
avctx
->
pkt_timebase
,
AV_TIME_BASE_Q
);
ret
=
avctx
->
codec
->
decode
(
avctx
,
sub
,
got_sub_ptr
,
&
tmp
);
sub
->
format
=
sub
->
num_rects
&&
sub
->
rects
[
0
]
->
ass
;
sub
->
format
=
!
(
avctx
->
codec_descriptor
->
props
&
AV_CODEC_PROP_BITMAP_SUB
)
;
avctx
->
pkt
=
NULL
;
if
(
did_split
)
{
...
...
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