[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec fraps.c, NONE, 1.1 Makefile, 1.187, 1.188 allcodecs.c, 1.104, 1.105 avcodec.h, 1.397, 1.398

Mike Melanson mike
Wed May 18 15:14:43 CEST 2005


Roine Gustafsson wrote:
> 
> On May 18, 2005, at 12:47 AM, Mike Melanson CVS wrote:
> 
>> Log Message:
>> Fraps FPS1 video decoder (v1 & v2), courtesy of Roine Gustafsson <roine
>> at users sf net>
> 
> 
> No, it's v0 and v1 :)

	Ooops.. oh well.

>> #define FPS_TAG MKTAG('F', 'P', 'S', '1')
> 
> 
> Why #define something you only use once?

	It's customary, vs. using hard-coded constants in the code. Besides, 
your original construct was invalid. It compared the number to 'FPSx' 
which the compiler complained (correctly) was a multi-character 
character constant.

> 
>>         if ((BE_32(buf) != FPS_TAG)||(buf_size < (3*1024 + 8))) {
>>             av_log(avctx, AV_LOG_ERROR, "Fraps: error in data stream\n");
>>             return -1;
>>         }
> 
> 
> This is wrong. MKTAG is little-endian and BE_32 is big-endian. If you 
> want to use MKTAG use LE_32.

	Thanks for pointing this out. I can never remember which is which.
-- 
	-Mike Melanson





More information about the ffmpeg-cvslog mailing list