Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
a4d3c200
Commit
a4d3c200
authored
10 years ago
by
Luca Barbato
Browse files
Options
Downloads
Patches
Plain Diff
vc1: Fix the skip condition
As written in the comment above, skip must be added only if a start code is found.
parent
ab56fabe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/vc1_parser.c
+3
-2
3 additions, 2 deletions
libavcodec/vc1_parser.c
with
3 additions
and
2 deletions
libavcodec/vc1_parser.c
+
3
−
2
View file @
a4d3c200
...
...
@@ -123,6 +123,7 @@ static int vc1_parse(AVCodecParserContext *s,
uint8_t
*
unesc_buffer
=
vpc
->
unesc_buffer
;
size_t
unesc_index
=
vpc
->
unesc_index
;
VC1ParseSearchState
search_state
=
vpc
->
search_state
;
int
start_code_found
;
int
next
=
END_NOT_FOUND
;
int
i
=
vpc
->
bytes_to_skip
;
...
...
@@ -133,8 +134,8 @@ static int vc1_parse(AVCodecParserContext *s,
next
=
0
;
}
while
(
i
<
buf_size
)
{
int
start_code_found
=
0
;
uint8_t
b
;
start_code_found
=
0
;
while
(
i
<
buf_size
&&
unesc_index
<
UNESCAPED_THRESHOLD
)
{
b
=
buf
[
i
++
];
unesc_buffer
[
unesc_index
++
]
=
b
;
...
...
@@ -232,7 +233,7 @@ static int vc1_parse(AVCodecParserContext *s,
* the start code we've already seen, or cause extra bytes to be
* inserted at the start of the unescaped buffer. */
vpc
->
bytes_to_skip
=
4
;
if
(
next
<
0
)
if
(
next
<
0
&&
start_code_found
)
vpc
->
bytes_to_skip
+=
next
;
*
poutbuf
=
buf
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment