[FFmpeg-cvslog] avcodec/libzvbi-teletextdec: allow -1 subtitle duration and make it the default
Marton Balint
git at videolan.org
Sun May 6 23:07:49 EEST 2018
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Apr 28 19:17:31 2018 +0200| [03038d4da95eaceef887a4c936825fa58841d767] | committer: Marton Balint
avcodec/libzvbi-teletextdec: allow -1 subtitle duration and make it the default
Most decoders (pgssubdec, ccaption_dec) are using -1 or UINT32_MAX for a
subtitle event which should be cleared at the next event.
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=03038d4da95eaceef887a4c936825fa58841d767
---
doc/decoders.texi | 3 ++-
libavcodec/libzvbi-teletextdec.c | 2 +-
libavcodec/version.h | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/doc/decoders.texi b/doc/decoders.texi
index a9510bdf02..a551d5d0fd 100644
--- a/doc/decoders.texi
+++ b/doc/decoders.texi
@@ -272,7 +272,8 @@ present between the subtitle lines because of double-sized teletext characters.
Default value is 1.
@item txt_duration
Sets the display duration of the decoded teletext pages or subtitles in
-milliseconds. Default value is 30000 which is 30 seconds.
+milliseconds. Default value is -1 which means infinity or until the next
+subtitle event comes.
@item txt_transparent
Force transparent background of the generated teletext bitmaps. Default value
is 0 which means an opaque background.
diff --git a/libavcodec/libzvbi-teletextdec.c b/libavcodec/libzvbi-teletextdec.c
index 30d0593430..44fca17b5d 100644
--- a/libavcodec/libzvbi-teletextdec.c
+++ b/libavcodec/libzvbi-teletextdec.c
@@ -548,7 +548,7 @@ static const AVOption options[] = {
{"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},
- {"txt_duration", "display duration of teletext pages in msecs", OFFSET(sub_duration), AV_OPT_TYPE_INT, {.i64 = 30000}, 0, 86400000, SD},
+ {"txt_duration", "display duration of teletext pages in msecs", OFFSET(sub_duration), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 86400000, SD},
{"txt_transparent", "force transparent background of the teletext", OFFSET(transparent_bg), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, SD},
{"txt_opacity", "set opacity of the transparent background", OFFSET(opacity), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 255, SD},
{ NULL },
diff --git a/libavcodec/version.h b/libavcodec/version.h
index f368be159d..3fda743cf9 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 19
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
More information about the ffmpeg-cvslog
mailing list