Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
6fd31613
Commit
6fd31613
authored
Nov 26, 2002
by
Laurent Aimar
Browse files
* mp4: prevent float exeption with some truncated file.
parent
aa142dbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/demux/mp4/mp4.c
View file @
6fd31613
...
...
@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mp4.c,v 1.
6
2002/11/
19
17:2
3
:2
1
fenrir Exp $
* $Id: mp4.c,v 1.
7
2002/11/
26
17:2
8
:2
2
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -276,9 +276,16 @@ static int MP4Init( vlc_object_t * p_this )
}
p_input
->
stream
.
p_selected_program
=
p_input
->
stream
.
pp_programs
[
0
];
/* XXX beurk and beurk, see MP4Demux and MP4Seek */
p_input
->
stream
.
i_mux_rate
=
p_input
->
stream
.
p_selected_area
->
i_size
/
50
/
(
p_demux
->
i_duration
/
p_demux
->
i_timescale
);
if
(
p_demux
->
i_duration
/
p_demux
->
i_timescale
>
0
)
{
p_input
->
stream
.
i_mux_rate
=
p_input
->
stream
.
p_selected_area
->
i_size
/
50
/
(
p_demux
->
i_duration
/
p_demux
->
i_timescale
);
}
else
{
p_input
->
stream
.
i_mux_rate
=
0
;
}
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
...
...
Write
Preview
Supports
Markdown
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