[MPlayer-cvslog] r37654 - trunk/gui/util/bitmap.c

ib subversion at mplayerhq.hu
Wed Feb 10 07:24:19 CET 2016


Author: ib
Date: Wed Feb 10 07:24:18 2016
New Revision: 37654

Log:
Be more precise about return value.

According to the documentation only negative values indicate an error.
Values larger than 0 are undefined.

Modified:
   trunk/gui/util/bitmap.c

Modified: trunk/gui/util/bitmap.c
==============================================================================
--- trunk/gui/util/bitmap.c	Tue Feb  9 23:56:40 2016	(r37653)
+++ trunk/gui/util/bitmap.c	Wed Feb 10 07:24:18 2016	(r37654)
@@ -123,7 +123,7 @@ static int pngRead(const char *fname, gu
 
     avcodec_register_all();
 
-    if (avcodec_open2(avctx, avcodec_find_decoder(AV_CODEC_ID_PNG), NULL) != 0) {
+    if (avcodec_open2(avctx, avcodec_find_decoder(AV_CODEC_ID_PNG), NULL) < 0) {
         av_free(frame);
         av_free(avctx);
         av_free(data);


More information about the MPlayer-cvslog mailing list