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
4a4107b4
Commit
4a4107b4
authored
11 years ago
by
Luca Barbato
Browse files
Options
Downloads
Patches
Plain Diff
jpegls: factorize return paths
parent
a5a0ef5e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/jpeglsdec.c
+6
-5
6 additions, 5 deletions
libavcodec/jpeglsdec.c
with
6 additions
and
5 deletions
libavcodec/jpeglsdec.c
+
6
−
5
View file @
4a4107b4
...
@@ -274,7 +274,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
...
@@ -274,7 +274,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
int
i
,
t
=
0
;
int
i
,
t
=
0
;
uint8_t
*
zero
,
*
last
,
*
cur
;
uint8_t
*
zero
,
*
last
,
*
cur
;
JLSState
*
state
;
JLSState
*
state
;
int
off
=
0
,
stride
=
1
,
width
,
shift
;
int
off
=
0
,
stride
=
1
,
width
,
shift
,
ret
=
0
;
zero
=
av_mallocz
(
s
->
picture_ptr
->
linesize
[
0
]);
zero
=
av_mallocz
(
s
->
picture_ptr
->
linesize
[
0
]);
last
=
zero
;
last
=
zero
;
...
@@ -347,9 +347,8 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
...
@@ -347,9 +347,8 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
}
}
}
else
if
(
ilv
==
2
)
{
/* sample interleaving */
}
else
if
(
ilv
==
2
)
{
/* sample interleaving */
avpriv_report_missing_feature
(
s
->
avctx
,
"Sample interleaved images"
);
avpriv_report_missing_feature
(
s
->
avctx
,
"Sample interleaved images"
);
av_free
(
state
);
ret
=
AVERROR_PATCHWELCOME
;
av_free
(
zero
);
goto
end
;
return
AVERROR_PATCHWELCOME
;
}
}
if
(
shift
)
{
/* we need to do point transform or normalize samples */
if
(
shift
)
{
/* we need to do point transform or normalize samples */
...
@@ -375,10 +374,12 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
...
@@ -375,10 +374,12 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near,
}
}
}
}
}
}
end:
av_free
(
state
);
av_free
(
state
);
av_free
(
zero
);
av_free
(
zero
);
return
0
;
return
ret
;
}
}
AVCodec
ff_jpegls_decoder
=
{
AVCodec
ff_jpegls_decoder
=
{
...
...
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