Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
- index de98da7..74eb106 100644
- --- a/libavcodec/fraps.c
- +++ b/libavcodec/fraps.c
- @@ -48,6 +48,7 @@ typedef struct FrapsContext{
- uint8_t *tmpbuf;
- int tmpbuf_size;
- DSPContext dsp;
- + int version;
- } FrapsContext;
- @@ -65,6 +66,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
- s->avctx = avctx;
- s->tmpbuf = NULL;
- + s->version = -1;
- dsputil_init(&s->dsp, avctx);
- @@ -143,6 +145,12 @@ static int decode_frame(AVCodecContext *avctx,
- header = AV_RL32(buf);
- version = header & 0xff;
- + if (version != s->version && s->version > -1) {
- + av_log(avctx, AV_LOG_INFO, "Multiple versions encountered in file\n");
- + if (s->frame.data[0])
- + avctx->release_buffer(avctx, &s->frame);
- + }
- + s->version = version;
- header_size = (header & (1<<30))? 8 : 4; /* bit 30 means pad to 8 bytes */
- if (version > 5) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement