[FFmpeg-cvslog] j2kenc: Fix pointer<->integer casts.
Michael Niedermayer
git at videolan.org
Wed Sep 28 15:26:53 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Sep 28 15:18:49 2011 +0200| [7393b41744a91677283f4e217f3ebe3a399182ab] | committer: Michael Niedermayer
j2kenc: Fix pointer<->integer casts.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7393b41744a91677283f4e217f3ebe3a399182ab
---
libavcodec/j2kenc.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index 5a08cb7..46aa45a 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);
More information about the ffmpeg-cvslog
mailing list