Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
ff2f9a52
Commit
ff2f9a52
authored
Jan 23, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/demux/mp4/mp4.c: don't segfault on reference files.
parent
c3e5226b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
14 deletions
+27
-14
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+27
-14
No files found.
modules/demux/mp4/mp4.c
View file @
ff2f9a52
...
...
@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mp4.c,v 1.5
5 2004/01/18 22:00:00 fenrir
Exp $
* $Id: mp4.c,v 1.5
6 2004/01/23 08:07:17 gbazin
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -575,11 +575,11 @@ static int Seek ( input_thread_t *p_input, mtime_t i_date )
/*****************************************************************************
* Control:
*****************************************************************************/
static
int
Control
(
input_thread_t
*
p_input
,
int
i_query
,
va_list
args
)
static
int
Control
(
input_thread_t
*
p_input
,
int
i_query
,
va_list
args
)
{
demux_sys_t
*
p_sys
=
p_input
->
p_demux_data
;
double
f
,
*
pf
;
double
f
,
*
pf
;
int64_t
i64
,
*
pi64
;
switch
(
i_query
)
...
...
@@ -598,17 +598,24 @@ static int Control ( input_thread_t *p_input, int i_query, va_list args )
case
DEMUX_SET_POSITION
:
f
=
(
double
)
va_arg
(
args
,
double
);
i64
=
(
int64_t
)(
f
*
(
double
)
1000000
*
(
double
)
p_sys
->
i_duration
/
(
double
)
p_sys
->
i_timescale
);
return
Seek
(
p_input
,
i64
);
if
(
p_sys
->
i_timescale
>
0
)
{
i64
=
(
int64_t
)(
f
*
(
double
)
1000000
*
(
double
)
p_sys
->
i_duration
/
(
double
)
p_sys
->
i_timescale
);
return
Seek
(
p_input
,
i64
);
}
else
return
VLC_SUCCESS
;
case
DEMUX_GET_TIME
:
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
*
pi64
=
(
mtime_t
)
1000000
*
(
mtime_t
)
p_sys
->
i_time
/
(
mtime_t
)
p_sys
->
i_timescale
;
if
(
p_sys
->
i_timescale
>
0
)
{
*
pi64
=
(
mtime_t
)
1000000
*
(
mtime_t
)
p_sys
->
i_time
/
(
mtime_t
)
p_sys
->
i_timescale
;
}
else
*
pi64
=
0
;
return
VLC_SUCCESS
;
case
DEMUX_SET_TIME
:
...
...
@@ -617,13 +624,19 @@ static int Control ( input_thread_t *p_input, int i_query, va_list args )
case
DEMUX_GET_LENGTH
:
pi64
=
(
int64_t
*
)
va_arg
(
args
,
int64_t
*
);
*
pi64
=
(
mtime_t
)
1000000
*
(
mtime_t
)
p_sys
->
i_duration
/
(
mtime_t
)
p_sys
->
i_timescale
;
if
(
p_sys
->
i_timescale
>
0
)
{
*
pi64
=
(
mtime_t
)
1000000
*
(
mtime_t
)
p_sys
->
i_duration
/
(
mtime_t
)
p_sys
->
i_timescale
;
}
else
*
pi64
=
0
;
return
VLC_SUCCESS
;
case
DEMUX_GET_FPS
:
msg_Warn
(
p_input
,
"DEMUX_GET_FPS unimplemented !!"
);
return
VLC_EGENERIC
;
default:
msg_Err
(
p_input
,
"control query unimplemented !!!"
);
return
demux_vaControlDefault
(
p_input
,
i_query
,
args
);
...
...
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