[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
Roine Gustafsson
roine
Wed May 18 10:37:41 CEST 2005
- Previous message: [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
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
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 :)
> #define FPS_TAG MKTAG('F', 'P', 'S', '1')
Why #define something you only use once?
> 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.
Also, I've realized this is not correct anyway since buf_size can be 8
(non-modified frame) which is valid.
--- libavcodec/fraps.c 17 May 2005 23:09:59 -0000 1.2
+++ libavcodec/fraps.c 18 May 2005 08:29:36 -0000
@@ -202,7 +202,7 @@
* off_3: 256xDWORD freqtbl_3 frequency table for plane 3
* plane_3
*/
- if ((BE_32(buf) != FPS_TAG)||(buf_size < (3*1024 + 8))) {
+ if ((buf_size > 8) && (LE_32(buf) != FPS_TAG)) {
av_log(avctx, AV_LOG_ERROR, "Fraps: error in data
stream\n");
return -1;
}
Pretty pointless anyway until someone figures out the rest of v2...
/Roine
- Previous message: [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
- Next message: [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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ffmpeg-cvslog
mailing list