[FFmpeg-cvslog] sunrast: Replace magic number by a macro.
Aneesh Dogra
git at videolan.org
Mon Jan 30 05:29:42 CET 2012
ffmpeg | branch: master | Aneesh Dogra <lionaneesh at gmail.com> | Sat Jan 28 18:52:12 2012 +0530| [fef3771778dbc9e7a17b7ce773f1b6d9651dff6f] | committer: Ronald S. Bultje
sunrast: Replace magic number by a macro.
Signed-off-by: Aneesh Dogra <lionaneesh at gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fef3771778dbc9e7a17b7ce773f1b6d9651dff6f
---
libavcodec/sunrast.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index a471aee..b21c260 100644
--- a/libavcodec/sunrast.c
+++ b/libavcodec/sunrast.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list