VAAPIEncodeContext *ctx = avctx->priv_data;
VAAPIEncodePicture *pic, *last_pic, *next;
+ av_assert0(!ctx->pic_start || ctx->pic_start->input_available);
+
// Find the last picture we actually have input for.
for (pic = ctx->pic_start; pic; pic = pic->next) {
if (!pic->input_available)
}
if (pic) {
- av_assert0(last_pic);
-
if (last_pic->type == PICTURE_TYPE_B) {
// Some fixing up is required. Change the type of this
// picture to P, then modify preceding B references which
goto fail;
}
if (avctx->max_b_frames > 0 && ref_l1 < 1) {
- av_log(avctx, AV_LOG_ERROR, "B frames are not "
- "supported (%#x).\n", attr[i].value);
- err = AVERROR(EINVAL);
- goto fail;
+ av_log(avctx, AV_LOG_WARNING, "B frames are not "
+ "supported (%#x) by the underlying driver.\n",
+ attr[i].value);
+ avctx->max_b_frames = 0;
}
}
break;