Mercurial > libavcodec.hg
comparison fraps.c @ 8257:6f0821e1f899 libavcodec
Fraps version 3 seems to be the same as Fraps v5
author | kostya |
---|---|
date | Thu, 04 Dec 2008 14:43:42 +0000 |
parents | 699c33b2eabf |
children | e9d9d946f213 |
comparison
equal
deleted
inserted
replaced
8256:765685da1483 | 8257:6f0821e1f899 |
---|---|
146 | 146 |
147 header = AV_RL32(buf); | 147 header = AV_RL32(buf); |
148 version = header & 0xff; | 148 version = header & 0xff; |
149 header_size = (header & (1<<30))? 8 : 4; /* bit 30 means pad to 8 bytes */ | 149 header_size = (header & (1<<30))? 8 : 4; /* bit 30 means pad to 8 bytes */ |
150 | 150 |
151 if (version > 2 && version != 4 && version != 5) { | 151 if (version > 5) { |
152 av_log(avctx, AV_LOG_ERROR, | 152 av_log(avctx, AV_LOG_ERROR, |
153 "This file is encoded with Fraps version %d. " \ | 153 "This file is encoded with Fraps version %d. " \ |
154 "This codec can only decode version 0, 1, 2 and 4.\n", version); | 154 "This codec can only decode versions <= 5.\n", version); |
155 return -1; | 155 return -1; |
156 } | 156 } |
157 | 157 |
158 buf+=4; | 158 buf+=4; |
159 if (header_size == 8) | 159 if (header_size == 8) |
286 av_log(avctx, AV_LOG_ERROR, "Error decoding plane %i\n", i); | 286 av_log(avctx, AV_LOG_ERROR, "Error decoding plane %i\n", i); |
287 return -1; | 287 return -1; |
288 } | 288 } |
289 } | 289 } |
290 break; | 290 break; |
291 case 3: | |
291 case 5: | 292 case 5: |
292 /* Virtually the same as version 4, but is for RGB24 */ | 293 /* Virtually the same as version 4, but is for RGB24 */ |
293 avctx->pix_fmt = PIX_FMT_BGR24; | 294 avctx->pix_fmt = PIX_FMT_BGR24; |
294 planes = 3; | 295 planes = 3; |
295 f->reference = 1; | 296 f->reference = 1; |