Revision ce5e49b0 libavcodec/h261dec.c

View differences:

libavcodec/h261dec.c
497 497
        skip_bits(&s->gb, 8);
498 498
    }
499 499

  
500
    // h261 has no I-FRAMES, but if we pass FF_I_TYPE for the first frame, the codec crashes if it does
500
    // h261 has no I-FRAMES, but if we pass AV_PICTURE_TYPE_I for the first frame, the codec crashes if it does
501 501
    // not contain all I-blocks (e.g. when a packet is lost)
502
    s->pict_type = FF_P_TYPE;
502
    s->pict_type = AV_PICTURE_TYPE_P;
503 503

  
504 504
    h->gob_number = 0;
505 505
    return 0;
......
597 597

  
598 598
    // for skipping the frame
599 599
    s->current_picture.pict_type= s->pict_type;
600
    s->current_picture.key_frame= s->pict_type == FF_I_TYPE;
600
    s->current_picture.key_frame= s->pict_type == AV_PICTURE_TYPE_I;
601 601

  
602
    if(  (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==FF_B_TYPE)
603
       ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=FF_I_TYPE)
602
    if(  (avctx->skip_frame >= AVDISCARD_NONREF && s->pict_type==AV_PICTURE_TYPE_B)
603
       ||(avctx->skip_frame >= AVDISCARD_NONKEY && s->pict_type!=AV_PICTURE_TYPE_I)
604 604
       || avctx->skip_frame >= AVDISCARD_ALL)
605 605
        return get_consumed_bytes(s, buf_size);
606 606

  

Also available in: Unified diff