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
d3b76c99
Commit
d3b76c99
authored
Jan 12, 2019
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/prosumer: Simplify code slightly in decompress()
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
ec28a851
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
prosumer.c
libavcodec/prosumer.c
+7
-12
No files found.
libavcodec/prosumer.c
View file @
d3b76c99
...
...
@@ -84,16 +84,13 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui
if
(
bytestream2_get_bytes_left
(
gb
)
<=
0
)
{
if
(
!
a
)
return
0
;
cnt
=
4
;
}
else
{
pos
=
bytestream2_tell
(
gb
)
^
2
;
bytestream2_seek
(
gb
,
pos
,
SEEK_SET
);
pos
=
bytestream2_tell
(
gb
);
bytestream2_seek
(
gb
,
pos
^
2
,
SEEK_SET
);
AV_WN16
(
&
a
,
bytestream2_peek_le16
(
gb
));
pos
=
pos
^
2
;
bytestream2_seek
(
gb
,
pos
,
SEEK_SET
);
bytestream2_skip
(
gb
,
2
);
cnt
=
4
;
bytestream2_seek
(
gb
,
pos
+
2
,
SEEK_SET
);
}
cnt
=
4
;
}
c
--
;
}
...
...
@@ -117,12 +114,10 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui
}
return
0
;
}
pos
=
bytestream2_tell
(
gb
)
^
2
;
bytestream2_seek
(
gb
,
pos
,
SEEK_SET
);
pos
=
bytestream2_tell
(
gb
);
bytestream2_seek
(
gb
,
pos
^
2
,
SEEK_SET
);
AV_WN16
(
&
a
,
bytestream2_peek_le16
(
gb
));
pos
=
pos
^
2
;
bytestream2_seek
(
gb
,
pos
,
SEEK_SET
);
bytestream2_skip
(
gb
,
2
);
bytestream2_seek
(
gb
,
pos
+
2
,
SEEK_SET
);
cnt
=
4
;
idx
--
;
}
...
...
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