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
4959a4fc
Commit
4959a4fc
authored
Apr 14, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swscale/utils: fix changing src/dst range after initializing the context
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
fa98885b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
utils.c
libswscale/utils.c
+6
-0
No files found.
libswscale/utils.c
View file @
4959a4fc
...
...
@@ -983,6 +983,7 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
{
const
AVPixFmtDescriptor
*
desc_dst
;
const
AVPixFmtDescriptor
*
desc_src
;
int
need_reinit
=
0
;
memmove
(
c
->
srcColorspaceTable
,
inv_table
,
sizeof
(
int
)
*
4
);
memmove
(
c
->
dstColorspaceTable
,
table
,
sizeof
(
int
)
*
4
);
...
...
@@ -998,9 +999,14 @@ int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
c
->
brightness
=
brightness
;
c
->
contrast
=
contrast
;
c
->
saturation
=
saturation
;
if
(
c
->
srcRange
!=
srcRange
||
c
->
dstRange
!=
dstRange
)
need_reinit
=
1
;
c
->
srcRange
=
srcRange
;
c
->
dstRange
=
dstRange
;
if
(
need_reinit
&&
c
->
srcBpc
==
8
)
ff_sws_init_range_convert
(
c
);
if
((
isYUV
(
c
->
dstFormat
)
||
isGray
(
c
->
dstFormat
))
&&
(
isYUV
(
c
->
srcFormat
)
||
isGray
(
c
->
srcFormat
)))
return
-
1
;
...
...
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