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
b689b1f6
Commit
b689b1f6
authored
Oct 20, 2013
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libzvbi-teletextdec: use option constants instead of strings
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
688652e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
libzvbi-teletextdec.c
libavcodec/libzvbi-teletextdec.c
+3
-10
No files found.
libavcodec/libzvbi-teletextdec.c
View file @
b689b1f6
...
...
@@ -48,7 +48,6 @@ typedef struct TeletextContext
char
*
pgno
;
int
x_offset
;
int
y_offset
;
char
*
format
;
int
format_id
;
/* 0 = bitmap, 1 = text */
int
chop_top
;
int
sub_duration
;
/* in msec */
...
...
@@ -437,14 +436,6 @@ static int teletext_init_decoder(AVCodecContext *avctx)
ctx
->
dx
=
NULL
;
ctx
->
vbi
=
NULL
;
ctx
->
pts
=
AV_NOPTS_VALUE
;
if
(
!
strcmp
(
ctx
->
format
,
"bitmap"
))
{
ctx
->
format_id
=
0
;
}
else
if
(
!
strcmp
(
ctx
->
format
,
"text"
))
{
ctx
->
format_id
=
1
;
}
else
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"unkown format %s
\n
"
,
ctx
->
format
);
return
AVERROR_OPTION_NOT_FOUND
;
}
#ifdef DEBUG
{
...
...
@@ -485,7 +476,9 @@ static void teletext_flush(AVCodecContext *avctx)
static
const
AVOption
options
[]
=
{
{
"txt_page"
,
"list of teletext page numbers to decode, * is all"
,
OFFSET
(
pgno
),
AV_OPT_TYPE_STRING
,
{.
str
=
"*"
},
0
,
0
,
SD
},
{
"txt_chop_top"
,
"discards the top teletext line"
,
OFFSET
(
chop_top
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
SD
},
{
"txt_format"
,
"format of the subtitles (bitmap or text)"
,
OFFSET
(
format
),
AV_OPT_TYPE_STRING
,
{.
str
=
"bitmap"
},
0
,
0
,
SD
},
{
"txt_format"
,
"format of the subtitles (bitmap or text)"
,
OFFSET
(
format_id
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1
,
SD
,
"txt_format"
},
{
"bitmap"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
0
,
SD
,
"txt_format"
},
{
"text"
,
NULL
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
0
,
SD
,
"txt_format"
},
{
"txt_left"
,
"x offset of generated bitmaps"
,
OFFSET
(
x_offset
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
65535
,
SD
},
{
"txt_top"
,
"y offset of generated bitmaps"
,
OFFSET
(
y_offset
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
65535
,
SD
},
{
"txt_chop_spaces"
,
"chops leading and trailing spaces from text"
,
OFFSET
(
chop_spaces
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
SD
},
...
...
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