Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
fb98cdb0
Commit
fb98cdb0
authored
May 25, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: avi file is a piece of sh*t, make more test.
parent
830af7ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
+24
-8
plugins/avi/avi.c
plugins/avi/avi.c
+7
-3
plugins/avi/libioRIFF.c
plugins/avi/libioRIFF.c
+17
-5
No files found.
plugins/avi/avi.c
View file @
fb98cdb0
...
...
@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.
19 2002/05/18 17:47:46 sam
Exp $
* $Id: avi.c,v 1.
20 2002/05/25 16:23:07 fenrir
Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -1110,9 +1110,13 @@ static pes_packet_t *__AVI_ReadStreamChunkInPES( input_thread_t *p_input,
{
return
(
NULL
);
}
/*- XXX avio is sh*t sometime chunk size is broken, and
we must choose index sie */
if
(
(
__AVI_GoToStreamChunk
(
p_input
,
p_info
,
p_info
->
i_idxposc
)
!=
0
)
||
(
RIFF_LoadChunkDataInPES
(
p_input
,
&
p_pes
)
!=
0
)
)
||
(
RIFF_LoadChunkDataInPES
(
p_input
,
&
p_pes
,
p_info
->
p_index
[
p_info
->
i_idxposc
].
i_length
)
!=
0
)
)
{
return
(
NULL
);
}
...
...
plugins/avi/libioRIFF.c
View file @
fb98cdb0
...
...
@@ -2,7 +2,7 @@
* libioRIFF.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libioRIFF.c,v 1.
5 2002/05/05 17:20:49
fenrir Exp $
* $Id: libioRIFF.c,v 1.
6 2002/05/25 16:23:07
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -283,11 +283,13 @@ static int RIFF_LoadChunkData(input_thread_t * p_input,riffchunk_t *p_riff )
}
static
int
RIFF_LoadChunkDataInPES
(
input_thread_t
*
p_input
,
pes_packet_t
**
pp_pes
)
pes_packet_t
**
pp_pes
,
int
i_size_index
)
{
u32
i_read
;
data_packet_t
*
p_data
;
riffchunk_t
*
p_riff
;
int
i_size
;
if
(
(
p_riff
=
RIFF_ReadChunk
(
p_input
))
==
NULL
)
{
...
...
@@ -301,6 +303,16 @@ static int RIFF_LoadChunkDataInPES(input_thread_t * p_input,
{
return
(
-
1
);
}
if
(
(
!
p_riff
->
i_size
)
||
(
!
i_size_index
)
)
{
i_size
=
__MAX
(
i_size_index
,
p_riff
->
i_size
);
}
else
{
i_size
=
__MIN
(
p_riff
->
i_size
,
i_size_index
);
}
if
(
p_riff
->
i_size
==
0
)
{
p_data
=
input_NewPacket
(
p_input
->
p_method_data
,
0
);
...
...
@@ -313,7 +325,7 @@ static int RIFF_LoadChunkDataInPES(input_thread_t * p_input,
do
{
i_read
=
input_SplitBuffer
(
p_input
,
&
p_data
,
p_riff
->
i_size
-
i_read
=
input_SplitBuffer
(
p_input
,
&
p_data
,
i_size
-
(
*
pp_pes
)
->
i_pes_size
);
if
(
i_read
<
0
)
{
...
...
@@ -336,9 +348,9 @@ static int RIFF_LoadChunkDataInPES(input_thread_t * p_input,
(
*
pp_pes
)
->
i_pes_size
+=
(
p_data
->
p_payload_end
-
p_data
->
p_payload_start
);
}
}
while
(
((
*
pp_pes
)
->
i_pes_size
<
p_riff
->
i_size
)
&&
(
i_read
!=
0
)
);
}
while
(
((
*
pp_pes
)
->
i_pes_size
<
i_size
)
&&
(
i_read
!=
0
)
);
/* i_read = 0 si fin du stream sinon block */
if
(
p_riff
->
i_size
%
2
!=
0
)
if
(
i_size
%
2
!=
0
)
{
__RIFF_SkipBytes
(
p_input
,
1
);
}
/* aligne sur un mot */
...
...
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