[FFmpeg-cvslog] avcodec/pngenc: don't return a value in a void function

James Almer git at videolan.org
Thu Apr 2 23:27:43 CEST 2015


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Apr  2 17:19:41 2015 -0300| [30001837324804855ee32ff79375502186ab9bc9] | committer: Michael Niedermayer

avcodec/pngenc: don't return a value in a void function

Should fix compilation failures with strict compilers

Signed-off-by: James Almer <jamrial at gmail.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=30001837324804855ee32ff79375502186ab9bc9
---

 libavcodec/pngenc.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 8699b80..7a9d0b0 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);
 



More information about the ffmpeg-cvslog mailing list