Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
9b19a075
Commit
9b19a075
authored
Jul 20, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed subtitle duration when rate != default.
parent
66d883a9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
11 deletions
+36
-11
modules/codec/csri.c
modules/codec/csri.c
+8
-1
modules/codec/kate.c
modules/codec/kate.c
+4
-1
modules/codec/subtitles/subsdec.c
modules/codec/subtitles/subsdec.c
+10
-4
modules/codec/subtitles/subsusf.c
modules/codec/subtitles/subsusf.c
+10
-4
modules/codec/telx.c
modules/codec/telx.c
+4
-1
No files found.
modules/codec/csri.c
View file @
9b19a075
...
@@ -24,10 +24,14 @@
...
@@ -24,10 +24,14 @@
/*****************************************************************************
/*****************************************************************************
* Preamble
* Preamble
*****************************************************************************/
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include "config.h"
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_plugin.h>
#include <vlc_vout.h>
#include <vlc_vout.h>
...
@@ -36,6 +40,7 @@
...
@@ -36,6 +40,7 @@
#include <vlc_block.h>
#include <vlc_block.h>
#include <vlc_filter.h>
#include <vlc_filter.h>
#include <vlc_stream.h>
#include <vlc_stream.h>
#include <vlc_input.h>
#include <vlc_xml.h>
#include <vlc_xml.h>
#include <math.h>
#include <math.h>
...
@@ -170,6 +175,8 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
...
@@ -170,6 +175,8 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
return
NULL
;
return
NULL
;
p_block
=
*
pp_block
;
p_block
=
*
pp_block
;
if
(
p_block
->
i_rate
!=
0
)
p_block
->
i_length
=
p_block
->
i_length
*
p_block
->
i_rate
/
INPUT_RATE_DEFAULT
;
*
pp_block
=
NULL
;
*
pp_block
=
NULL
;
if
(
p_block
->
i_buffer
==
0
||
p_block
->
p_buffer
[
0
]
==
'\0'
)
if
(
p_block
->
i_buffer
==
0
||
p_block
->
p_buffer
[
0
]
==
'\0'
)
...
...
modules/codec/kate.c
View file @
9b19a075
...
@@ -210,9 +210,12 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
...
@@ -210,9 +210,12 @@ static subpicture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
block_t
*
p_block
;
block_t
*
p_block
;
kate_packet
kp
;
kate_packet
kp
;
if
(
!
pp_block
||
!*
pp_block
)
return
NULL
;
if
(
!
pp_block
||
!*
pp_block
)
return
NULL
;
p_block
=
*
pp_block
;
p_block
=
*
pp_block
;
if
(
p_block
->
i_rate
!=
0
)
p_block
->
i_length
=
p_block
->
i_length
*
p_block
->
i_rate
/
INPUT_RATE_DEFAULT
;
/* Block to Kate packet */
/* Block to Kate packet */
kate_packet_wrap
(
&
kp
,
p_block
->
i_buffer
,
p_block
->
p_buffer
);
kate_packet_wrap
(
&
kp
,
p_block
->
i_buffer
,
p_block
->
p_buffer
);
...
...
modules/codec/subtitles/subsdec.c
View file @
9b19a075
...
@@ -252,13 +252,19 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -252,13 +252,19 @@ static int OpenDecoder( vlc_object_t *p_this )
****************************************************************************/
****************************************************************************/
static
subpicture_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
subpicture_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
{
subpicture_t
*
p_spu
=
NULL
;
subpicture_t
*
p_spu
;
block_t
*
p_block
;
if
(
!
pp_block
||
*
pp_block
==
NULL
)
return
NULL
;
if
(
!
pp_block
||
*
pp_block
==
NULL
)
return
NULL
;
p_block
=
*
pp_block
;
if
(
p_block
->
i_rate
!=
0
)
p_block
->
i_length
=
p_block
->
i_length
*
p_block
->
i_rate
/
INPUT_RATE_DEFAULT
;
p_spu
=
ParseText
(
p_dec
,
*
p
p_block
);
p_spu
=
ParseText
(
p_dec
,
p_block
);
block_Release
(
*
p
p_block
);
block_Release
(
p_block
);
*
pp_block
=
NULL
;
*
pp_block
=
NULL
;
return
p_spu
;
return
p_spu
;
...
...
modules/codec/subtitles/subsusf.c
View file @
9b19a075
...
@@ -118,13 +118,19 @@ static int OpenDecoder( vlc_object_t *p_this )
...
@@ -118,13 +118,19 @@ static int OpenDecoder( vlc_object_t *p_this )
****************************************************************************/
****************************************************************************/
static
subpicture_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
static
subpicture_t
*
DecodeBlock
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
{
subpicture_t
*
p_spu
=
NULL
;
subpicture_t
*
p_spu
;
block_t
*
p_block
;
if
(
!
pp_block
||
*
pp_block
==
NULL
)
return
NULL
;
if
(
!
pp_block
||
*
pp_block
==
NULL
)
return
NULL
;
p_block
=
*
pp_block
;
if
(
p_block
->
i_rate
!=
0
)
p_block
->
i_length
=
p_block
->
i_length
*
p_block
->
i_rate
/
INPUT_RATE_DEFAULT
;
p_spu
=
ParseText
(
p_dec
,
*
p
p_block
);
p_spu
=
ParseText
(
p_dec
,
p_block
);
block_Release
(
*
p
p_block
);
block_Release
(
p_block
);
*
pp_block
=
NULL
;
*
pp_block
=
NULL
;
return
p_spu
;
return
p_spu
;
...
...
modules/codec/telx.c
View file @
9b19a075
...
@@ -453,8 +453,11 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
...
@@ -453,8 +453,11 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
char
psz_line
[
256
];
char
psz_line
[
256
];
int
i
,
total
;
int
i
,
total
;
if
(
pp_block
==
NULL
||
*
pp_block
==
NULL
)
return
NULL
;
if
(
pp_block
==
NULL
||
*
pp_block
==
NULL
)
return
NULL
;
p_block
=
*
pp_block
;
p_block
=
*
pp_block
;
if
(
p_block
->
i_rate
!=
0
)
p_block
->
i_length
=
p_block
->
i_length
*
p_block
->
i_rate
/
INPUT_RATE_DEFAULT
;
*
pp_block
=
NULL
;
*
pp_block
=
NULL
;
dbg
((
p_dec
,
"start of telx packet with header %2x
\n
"
,
dbg
((
p_dec
,
"start of telx packet with header %2x
\n
"
,
...
...
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