Revision ce5e49b0 libavcodec/fraps.c

View differences:

libavcodec/fraps.c
180 180
            return -1;
181 181
        }
182 182
        /* bit 31 means same as previous pic */
183
        f->pict_type = (header & (1U<<31))? FF_P_TYPE : FF_I_TYPE;
184
        f->key_frame = f->pict_type == FF_I_TYPE;
183
        f->pict_type = (header & (1U<<31))? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
184
        f->key_frame = f->pict_type == AV_PICTURE_TYPE_I;
185 185

  
186
        if (f->pict_type == FF_I_TYPE) {
186
        if (f->pict_type == AV_PICTURE_TYPE_I) {
187 187
            buf32=(const uint32_t*)buf;
188 188
            for(y=0; y<avctx->height/2; y++){
189 189
                luma1=(uint32_t*)&f->data[0][ y*2*f->linesize[0] ];
......
223 223
            return -1;
224 224
        }
225 225
        /* bit 31 means same as previous pic */
226
        f->pict_type = (header & (1U<<31))? FF_P_TYPE : FF_I_TYPE;
227
        f->key_frame = f->pict_type == FF_I_TYPE;
226
        f->pict_type = (header & (1U<<31))? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
227
        f->key_frame = f->pict_type == AV_PICTURE_TYPE_I;
228 228

  
229
        if (f->pict_type == FF_I_TYPE) {
229
        if (f->pict_type == AV_PICTURE_TYPE_I) {
230 230
            for(y=0; y<avctx->height; y++)
231 231
                memcpy(&f->data[0][ (avctx->height-y)*f->linesize[0] ],
232 232
                       &buf[y*avctx->width*3],
......
252 252
        }
253 253
        /* skip frame */
254 254
        if(buf_size == 8) {
255
            f->pict_type = FF_P_TYPE;
255
            f->pict_type = AV_PICTURE_TYPE_P;
256 256
            f->key_frame = 0;
257 257
            break;
258 258
        }
259
        f->pict_type = FF_I_TYPE;
259
        f->pict_type = AV_PICTURE_TYPE_I;
260 260
        f->key_frame = 1;
261 261
        if ((AV_RL32(buf) != FPS_TAG)||(buf_size < (planes*1024 + 24))) {
262 262
            av_log(avctx, AV_LOG_ERROR, "Fraps: error in data stream\n");
......
297 297
        }
298 298
        /* skip frame */
299 299
        if(buf_size == 8) {
300
            f->pict_type = FF_P_TYPE;
300
            f->pict_type = AV_PICTURE_TYPE_P;
301 301
            f->key_frame = 0;
302 302
            break;
303 303
        }
304
        f->pict_type = FF_I_TYPE;
304
        f->pict_type = AV_PICTURE_TYPE_I;
305 305
        f->key_frame = 1;
306 306
        if ((AV_RL32(buf) != FPS_TAG)||(buf_size < (planes*1024 + 24))) {
307 307
            av_log(avctx, AV_LOG_ERROR, "Fraps: error in data stream\n");

Also available in: Unified diff