This is a temporary workaround to allow deprecating
avcodec_get_frame_defaults(). The proper solution will be using a
properly allocated AVFrame in Picture.
if (!h->DPB)
return AVERROR(ENOMEM);
for (i = 0; i < MAX_PICTURE_COUNT; i++)
- avcodec_get_frame_defaults(&h->DPB[i].f);
- avcodec_get_frame_defaults(&h->cur_pic.f);
+ av_frame_unref(&h->DPB[i].f);
+ av_frame_unref(&h->cur_pic.f);
}
return 0;
h->context_initialized = 0;
memset(&h->cur_pic, 0, sizeof(h->cur_pic));
- avcodec_get_frame_defaults(&h->cur_pic.f);
+ av_frame_unref(&h->cur_pic.f);
h->cur_pic.tf.f = &h->cur_pic.f;
h->avctx = dst;