Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
bef8dfa0
Commit
bef8dfa0
authored
Dec 08, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
escape130: replace can_safely_read() by get_bits_left()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f7da1235
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
escape130.c
libavcodec/escape130.c
+2
-6
No files found.
libavcodec/escape130.c
View file @
bef8dfa0
...
...
@@ -29,10 +29,6 @@ typedef struct Escape130Context {
uint8_t
*
bases
;
}
Escape130Context
;
static
int
can_safely_read
(
GetBitContext
*
gb
,
int
bits
)
{
return
get_bits_count
(
gb
)
+
bits
<=
gb
->
size_in_bits
;
}
/**
* Initialize the decoder
* @param avctx decoder context
...
...
@@ -69,7 +65,7 @@ static unsigned decode_skip_count(GetBitContext* gb) {
unsigned
value
;
// This function reads a maximum of 27 bits,
// which is within the padding space
if
(
!
can_safely_read
(
gb
,
1
+
3
)
)
if
(
get_bits_left
(
gb
)
<
1
+
3
)
return
-
1
;
value
=
get_bits1
(
gb
);
...
...
@@ -126,7 +122,7 @@ static int escape130_decode_frame(AVCodecContext *avctx,
init_get_bits
(
&
gb
,
buf
,
buf_size
*
8
);
if
(
!
can_safely_read
(
&
gb
,
128
)
)
if
(
get_bits_left
(
&
gb
)
<
128
)
return
-
1
;
// Header; no useful information in here
...
...
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