summaryrefslogtreecommitdiff
path: root/libavcodec/j2kenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-09-28 15:18:49 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-28 15:25:04 +0200
commit7393b41744a91677283f4e217f3ebe3a399182ab (patch)
treee6461f75d25385731af04a0a617a7ffecd72b633 /libavcodec/j2kenc.c
parent5a6e7771edc59a8971793a5d0d6426c4ce5ee4fa (diff)
downloadffmpeg-7393b41744a91677283f4e217f3ebe3a399182ab.tar.gz
j2kenc: Fix pointer<->integer casts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/j2kenc.c')
-rw-r--r--libavcodec/j2kenc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index 5a08cb7668..46aa45a674 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -330,7 +330,7 @@ static uint8_t *put_sot(J2kEncoderContext *s, int tileno)
uint8_t *psotptr;
if (s->buf_end - s->buf < 12)
- return -1;
+ return NULL;
bytestream_put_be16(&s->buf, J2K_SOT);
bytestream_put_be16(&s->buf, 10); // Lsot
@@ -950,8 +950,8 @@ static int encode_frame(AVCodecContext *avctx,
for (tileno = 0; tileno < s->numXtiles * s->numYtiles; tileno++){
uint8_t *psotptr;
- if ((psotptr = put_sot(s, tileno)) < 0)
- return psotptr;
+ if (!(psotptr = put_sot(s, tileno)))
+ return -1;
if (s->buf_end - s->buf < 2)
return -1;
bytestream_put_be16(&s->buf, J2K_SOD);