Commit fef37717 authored by Aneesh Dogra's avatar Aneesh Dogra Committed by Ronald S. Bultje

sunrast: Replace magic number by a macro.

Signed-off-by: 's avatarAneesh Dogra <lionaneesh@gmail.com>
Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent 2e626dd5
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include "libavutil/imgutils.h" #include "libavutil/imgutils.h"
#include "avcodec.h" #include "avcodec.h"
#define RAS_MAGIC 0x59a66a95
/* The Old and Standard format types indicate that the image data is /* The Old and Standard format types indicate that the image data is
* uncompressed. There is no difference between the two formats. */ * uncompressed. There is no difference between the two formats. */
#define RT_OLD 0 #define RT_OLD 0
...@@ -74,7 +76,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data, ...@@ -74,7 +76,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
if (avpkt->size < 32) if (avpkt->size < 32)
return AVERROR_INVALIDDATA; 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"); av_log(avctx, AV_LOG_ERROR, "this is not sunras encoded data\n");
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment