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
48b927bb
Commit
48b927bb
authored
Jul 16, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed GetChunk for chunks < 4 bytes.
parent
a7a2bab4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
include/input_ext-dec.h
include/input_ext-dec.h
+9
-8
No files found.
include/input_ext-dec.h
View file @
48b927bb
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-dec.h,v 1.3
2 2001/05/01 12:22:18 sam
Exp $
* $Id: input_ext-dec.h,v 1.3
3 2001/07/16 12:10:32 massiot
Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
...
@@ -401,7 +401,7 @@ static __inline__ void RealignBits( bit_stream_t * p_bit_stream )
...
@@ -401,7 +401,7 @@ static __inline__ void RealignBits( bit_stream_t * p_bit_stream )
* GetChunk : reads a large chunk of data
* GetChunk : reads a large chunk of data
*****************************************************************************
*****************************************************************************
* The position in the stream must be byte-aligned, if unsure call
* The position in the stream must be byte-aligned, if unsure call
* RealignBits(). p_buffer must to a buffer at least as big as i_buf_len
* RealignBits(). p_buffer must
point
to a buffer at least as big as i_buf_len
* otherwise your code will crash.
* otherwise your code will crash.
*****************************************************************************/
*****************************************************************************/
static
__inline__
void
GetChunk
(
bit_stream_t
*
p_bit_stream
,
static
__inline__
void
GetChunk
(
bit_stream_t
*
p_bit_stream
,
...
@@ -409,13 +409,14 @@ static __inline__ void GetChunk( bit_stream_t * p_bit_stream,
...
@@ -409,13 +409,14 @@ static __inline__ void GetChunk( bit_stream_t * p_bit_stream,
{
{
ptrdiff_t
i_available
;
ptrdiff_t
i_available
;
if
(
p_bit_stream
->
fifo
.
i_available
)
/* We need to take care because i_buf_len may be < 4. */
while
(
p_bit_stream
->
fifo
.
i_available
>
0
&&
i_buf_len
)
{
{
*
((
WORD_TYPE
*
)
p_buffer
)
=
WORD_AT
(
&
p_bit_stream
->
fifo
.
buffer
);
*
p_buffer
=
p_bit_stream
->
fifo
.
buffer
>>
(
8
*
sizeof
(
WORD_TYPE
)
-
8
);
p_buffer
+=
p_bit_stream
->
fifo
.
i_available
>>
3
;
p_buffer
++
;
i_buf_len
-=
p_bit_stream
->
fifo
.
i_available
>>
3
;
i_buf_len
--
;
p_bit_stream
->
fifo
.
buffer
=
0
;
p_bit_stream
->
fifo
.
buffer
<<=
8
;
p_bit_stream
->
fifo
.
i_available
=
0
;
p_bit_stream
->
fifo
.
i_available
-=
8
;
}
}
if
(
(
i_available
=
p_bit_stream
->
p_end
-
p_bit_stream
->
p_byte
)
if
(
(
i_available
=
p_bit_stream
->
p_end
-
p_bit_stream
->
p_byte
)
...
...
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