Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
6e3dbc37
Commit
6e3dbc37
authored
Aug 28, 2006
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Use the microdvd framerate when available
* avoid the error on sub-original-fps
parent
d9c2c093
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
22 deletions
+28
-22
modules/demux/subtitle.c
modules/demux/subtitle.c
+28
-22
No files found.
modules/demux/subtitle.c
View file @
6e3dbc37
...
...
@@ -171,13 +171,14 @@ static int Control( demux_t *, int, va_list );
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_sys_t
*
p_sys
;
es_format_t
fmt
;
float
f_fps
;
char
*
psz_type
;
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_sys_t
*
p_sys
;
es_format_t
fmt
;
input_thread_t
*
p_input
;
float
f_fps
;
char
*
psz_type
;
int
(
*
pf_read
)(
demux_t
*
,
subtitle_t
*
);
int
i
,
i_max
;
int
i
,
i_max
;
if
(
strcmp
(
p_demux
->
psz_demux
,
"subtitle"
)
)
{
...
...
@@ -188,11 +189,12 @@ static int Open ( vlc_object_t *p_this )
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
p_sys
->
psz_header
=
NULL
;
p_sys
->
i_subtitle
=
0
;
p_sys
->
i_subtitles
=
0
;
p_sys
->
subtitle
=
NULL
;
p_sys
->
psz_header
=
NULL
;
p_sys
->
i_subtitle
=
0
;
p_sys
->
i_subtitles
=
0
;
p_sys
->
subtitle
=
NULL
;
p_sys
->
i_microsecperframe
=
0
;
p_sys
->
i_original_mspf
=
0
;
/* Get the FPS */
f_fps
=
var_CreateGetFloat
(
p_demux
,
"sub-fps"
);
...
...
@@ -200,19 +202,15 @@ static int Open ( vlc_object_t *p_this )
{
p_sys
->
i_microsecperframe
=
(
int64_t
)(
(
float
)
1000000
/
f_fps
);
}
else
{
p_sys
->
i_microsecperframe
=
0
;
}
f_fps
=
var_CreateGetFloat
(
p_demux
,
"sub-original-fps"
);
if
(
f_fps
>=
1
.
0
)
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_demux
,
VLC_OBJECT_INPUT
,
FIND_PARENT
);
if
(
p_input
)
{
p_sys
->
i_original_mspf
=
(
int64_t
)(
(
float
)
1000000
/
f_fps
);
}
else
{
p_sys
->
i_original_mspf
=
0
;
f_fps
=
var_GetFloat
(
p_input
,
"sub-original-fps"
);
if
(
f_fps
>=
1
.
0
)
p_sys
->
i_original_mspf
=
(
int64_t
)(
(
float
)
1000000
/
f_fps
);
vlc_object_release
(
p_input
)
;
}
/* Get or probe the type */
...
...
@@ -727,6 +725,14 @@ static int ParseMicroDvd( demux_t *p_demux, subtitle_t *p_subtitle )
break
;
}
}
if
(
i_start
==
1
&&
i_stop
==
1
)
{
/* We found a possible setting of the framerate "{1}{1}23.976" */
float
tmp
=
us_strtod
(
buffer_text
,
NULL
);
if
(
tmp
>
0
.
0
&&
!
var_GetFloat
(
p_demux
,
"sub-fps"
)
>
0
.
0
)
p_sys
->
i_microsecperframe
=
tmp
;
}
/* replace | by \n */
for
(
i
=
0
;
i
<
strlen
(
buffer_text
);
i
++
)
{
...
...
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