Ticket #4798: h264_0.diff

File h264_0.diff, 586 bytes (added by Mark Buechler <Mark.Buechler@…>, 13 years ago)

Skip B pics before refs - from ffmpeg

  • libavcodec/h264.c

     
    39113911    h->slice_type= slice_type;
    39123912
    39133913    s->pict_type= h->slice_type; // to make a few old func happy, it's wrong though
     3914    if (s->pict_type == B_TYPE && s->last_picture_ptr == NULL) {
     3915        av_log(h->s.avctx, AV_LOG_ERROR,
     3916               "B picture before any references, skipping\n");
     3917        return -1;
     3918    }
    39143919
    39153920    pps_id= get_ue_golomb(&s->gb);
    39163921    if(pps_id>=MAX_PPS_COUNT){