summaryrefslogtreecommitdiff
path: root/libavcodec/pngenc.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2015-04-02 17:19:41 -0300
committerMichael Niedermayer <michaelni@gmx.at>2015-04-02 23:22:28 +0200
commit30001837324804855ee32ff79375502186ab9bc9 (patch)
tree29c6fee6f2d2d20a06fb7b7b6d9ac9dc4a4adcde /libavcodec/pngenc.c
parent0bf980919ef96da6c04642e634d0f529d6783276 (diff)
downloadffmpeg-30001837324804855ee32ff79375502186ab9bc9.tar.gz
avcodec/pngenc: don't return a value in a void function
Should fix compilation failures with strict compilers Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pngenc.c')
-rw-r--r--libavcodec/pngenc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 8699b80f99..7a9d0b0f79 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -229,8 +229,10 @@ static void png_write_image_data(AVCodecContext *avctx,
const AVCRC *crc_table = av_crc_get_table(AV_CRC_32_IEEE_LE);
uint32_t crc = ~0U;
- if (avctx->codec_id == AV_CODEC_ID_PNG || avctx->frame_number == 0)
- return png_write_chunk(&s->bytestream, MKTAG('I', 'D', 'A', 'T'), buf, length);
+ if (avctx->codec_id == AV_CODEC_ID_PNG || avctx->frame_number == 0) {
+ png_write_chunk(&s->bytestream, MKTAG('I', 'D', 'A', 'T'), buf, length);
+ return;
+ }
bytestream_put_be32(&s->bytestream, length + 4);