[vlc-commits] cvdsub: use MPEG timestamp macros
Steve Lhomme
git at videolan.org
Tue Sep 18 14:30:38 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed May 9 15:09:09 2018 +0200| [bf40abe3259c3fc1c3c90869fc25a3041c8b92ad] | committer: Steve Lhomme
cvdsub: use MPEG timestamp macros
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bf40abe3259c3fc1c3c90869fc25a3041c8b92ad
---
modules/codec/Makefile.am | 2 +-
modules/codec/cvdsub.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am
index 9f0b9bf4bb..97aef7205f 100644
--- a/modules/codec/Makefile.am
+++ b/modules/codec/Makefile.am
@@ -190,7 +190,7 @@ libcc_plugin_la_SOURCES = codec/cc.c codec/cc.h codec/substext.h \
codec/cea708.h codec/cea708.c
codec_LTLIBRARIES += libcc_plugin.la
-libcvdsub_plugin_la_SOURCES = codec/cvdsub.c
+libcvdsub_plugin_la_SOURCES = codec/cvdsub.c demux/mpeg/timestamps.h
codec_LTLIBRARIES += libcvdsub_plugin.la
libdvbsub_plugin_la_SOURCES = codec/dvbsub.c
diff --git a/modules/codec/cvdsub.c b/modules/codec/cvdsub.c
index 9d185ca228..df4916d5a0 100644
--- a/modules/codec/cvdsub.c
+++ b/modules/codec/cvdsub.c
@@ -37,6 +37,8 @@
#include <vlc_bits.h>
+#include "../demux/mpeg/timestamps.h"
+
#define DEBUG_CVDSUB 1
/*****************************************************************************
@@ -352,13 +354,12 @@ static void ParseMetaInfo( decoder_t *p_dec, block_t *p_spu )
switch( p[0] )
{
case 0x04: /* subtitle duration in 1/90000ths of a second */
- p_sys->i_duration = (p[1]<<16) + (p[2]<<8) + p[3];
+ p_sys->i_duration = FROM_SCALE_NZ( (p[1]<<16) + (p[2]<<8) + p[3] );
#ifdef DEBUG_CVDSUB
msg_Dbg( p_dec, "subtitle display duration %lu secs",
(long unsigned int)(p_sys->i_duration / 90000) );
#endif
- p_sys->i_duration *= 100 / 9;
break;
case 0x0c: /* unknown */
More information about the vlc-commits
mailing list