diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-16 00:38:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-16 15:58:40 +0200 |
commit | 2d7cec14beb506fe9971d88b3405081bd56f204c (patch) | |
tree | d647d15ec18b50a898ada09abc86b6ec89e26c61 /libavcodec/dvdsubdec.c | |
parent | bddc592001bd041511f4086a7d15611ec695e606 (diff) | |
download | ffmpeg-2d7cec14beb506fe9971d88b3405081bd56f204c.tar.gz |
avcodec/dvdsubdec: Dont mix integers with pointers
Reviewed-by: James Darnley <james.darnley@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dvdsubdec.c')
-rw-r--r-- | libavcodec/dvdsubdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index e198a6c9a0..7355c03ec2 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -213,7 +213,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, { int cmd_pos, pos, cmd, x1, y1, x2, y2, offset1, offset2, next_cmd_pos; int big_offsets, offset_size, is_8bit = 0; - const uint8_t *yuv_palette = 0; + const uint8_t *yuv_palette = NULL; uint8_t *colormap = ctx->colormap, *alpha = ctx->alpha; int date; int i; @@ -362,7 +362,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, buf, offset2, buf_size, is_8bit); sub_header->rects[0]->pict.data[1] = av_mallocz(AVPALETTE_SIZE); if (is_8bit) { - if (yuv_palette == 0) + if (!yuv_palette) goto fail; sub_header->rects[0]->nb_colors = 256; yuv_a_to_rgba(yuv_palette, alpha, (uint32_t*)sub_header->rects[0]->pict.data[1], 256); |