git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e1a7061
)
kgv1dec: return meaningful error codes.
author
Anton Khirnov
<anton@khirnov.net>
Fri, 16 Nov 2012 21:40:36 +0000
(22:40 +0100)
committer
Anton Khirnov
<anton@khirnov.net>
Sun, 6 Jan 2013 12:31:40 +0000
(13:31 +0100)
libavcodec/kgv1dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/kgv1dec.c
b/libavcodec/kgv1dec.c
index
fc99b21
..
01655a5
100644
(file)
--- a/
libavcodec/kgv1dec.c
+++ b/
libavcodec/kgv1dec.c
@@
-55,14
+55,14
@@
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
int w, h, i, res;
if (avpkt->size < 2)
int w, h, i, res;
if (avpkt->size < 2)
- return
-1
;
+ return
AVERROR_INVALIDDATA
;
w = (buf[0] + 1) * 8;
h = (buf[1] + 1) * 8;
buf += 2;
w = (buf[0] + 1) * 8;
h = (buf[1] + 1) * 8;
buf += 2;
- if (
av_image_check_size(w, h, 0, avctx)
)
- return
-1
;
+ if (
(res = av_image_check_size(w, h, 0, avctx)) < 0
)
+ return
res
;
if (w != avctx->width || h != avctx->height) {
if (c->prev.data[0])
if (w != avctx->width || h != avctx->height) {
if (c->prev.data[0])