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
815d5642
Commit
815d5642
authored
May 17, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* plugins/avi/avi.c : it will not segfault with broken avi with an unknown stream.
parent
c6e4a4b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
plugins/avi/avi.c
plugins/avi/avi.c
+11
-4
No files found.
plugins/avi/avi.c
View file @
815d5642
...
...
@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.1
7 2002/05/13 21:55:30
fenrir Exp $
* $Id: avi.c,v 1.1
8 2002/05/17 15:47:01
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -338,6 +338,9 @@ static void __AVI_UpdateIndexOffset( input_thread_t *p_input )
demux_data_avi_file_t
*
p_avi_demux
=
(
demux_data_avi_file_t
*
)
p_input
->
p_demux_data
;
/* FIXME some work to do :
* test in the ile if it's true, if not do a RIFF_Find...
*/
#define p_info p_avi_demux->pp_info[i_stream]
for
(
i_stream
=
0
;
i_stream
<
p_avi_demux
->
i_streams
;
i_stream
++
)
{
...
...
@@ -890,17 +893,18 @@ static int __AVI_NextIndexEntry( input_thread_t *p_input,
/* create entry on the fly */
/* search for the more advance stream and parse from it for all streams*/
p_info_tmp
=
p_info
;
for
(
i
=
0
;
i
<
p_avi_demux
->
i_streams
;
i
++
)
{
#define p_info_i p_avi_demux->pp_info[i]
if
(
p_info_i
->
p_index
[
p_info_i
->
i_idxnb
-
1
].
i_pos
>
p_info_tmp
->
p_index
[
p_info_tmp
->
i_idxnb
-
1
].
i_pos
)
if
(
(
p_info_i
->
p_index
)
&&
(
p_info_i
->
p_index
[
p_info_i
->
i_idxnb
-
1
].
i_pos
>
p_info_tmp
->
p_index
[
p_info_tmp
->
i_idxnb
-
1
].
i_pos
)
)
{
p_info_tmp
=
p_info_i
;
}
#undef p_info_i
}
/* go to last defined entry */
i_idxposc
=
p_info_tmp
->
i_idxposc
;
/* save p_info_tmp->i_idxposc */
p_info_tmp
->
i_idxposc
=
p_info_tmp
->
i_idxnb
-
1
;
...
...
@@ -933,6 +937,7 @@ static int __AVI_NextIndexEntry( input_thread_t *p_input,
#define p_info_i p_avi_demux->pp_info[i_number]
if
(
(
__AVI_ParseStreamHeader
(
index
.
i_id
,
&
i_number
,
&
i_type
)
==
0
)
&&
(
i_number
<
p_avi_demux
->
i_streams
)
&&
(
p_info_i
->
p_index
)
&&
(
p_info_i
->
p_index
[
p_info_i
->
i_idxnb
-
1
].
i_pos
+
p_info_i
->
p_index
[
p_info_i
->
i_idxnb
-
1
].
i_length
+
8
<=
index
.
i_pos
)
...
...
@@ -1371,6 +1376,7 @@ static pes_packet_t *AVI_GetFrameInPES( input_thread_t *p_input,
/* get pts while is valid */
i_pts
=
AVI_GetPTS
(
p_info
);
p_pes_tmp
=
__AVI_ReadStreamChunkInPES
(
p_input
,
p_info
);
if
(
!
p_pes_tmp
)
{
return
(
p_pes_first
);
...
...
@@ -1561,6 +1567,7 @@ static int AVIDemux( input_thread_t *p_input )
p_pes
=
AVI_GetFrameInPES
(
p_input
,
p_info_master
,
100000
);
/* 100 ms */
AVI_DecodePES
(
p_input
,
p_info_master
,
p_pes
);
...
...
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