sunrast: Replace magic number by a macro.
authorAneesh Dogra <lionaneesh@gmail.com>
Sat, 28 Jan 2012 13:04:12 +0000 (18:34 +0530)
committerRonald S. Bultje <rsbultje@gmail.com>
Sun, 29 Jan 2012 16:11:06 +0000 (08:11 -0800)
Signed-off-by: Aneesh Dogra <lionaneesh@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavcodec/sunrast.c

index a471aee..b21c260 100644 (file)
@@ -23,6 +23,8 @@
 #include "libavutil/imgutils.h"
 #include "avcodec.h"
 
+#define RAS_MAGIC 0x59a66a95
+
 /* The Old and Standard format types indicate that the image data is
  * uncompressed. There is no difference between the two formats. */
 #define RT_OLD          0
@@ -74,7 +76,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
     if (avpkt->size < 32)
         return AVERROR_INVALIDDATA;
 
-    if (AV_RB32(buf) != 0x59a66a95) {
+    if (AV_RB32(buf) != RAS_MAGIC) {
         av_log(avctx, AV_LOG_ERROR, "this is not sunras encoded data\n");
         return -1;
     }