summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_uspp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpcodecs/vf_uspp.c')
-rw-r--r--libmpcodecs/vf_uspp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmpcodecs/vf_uspp.c b/libmpcodecs/vf_uspp.c
index 332d59ee22..ae044b19a6 100644
--- a/libmpcodecs/vf_uspp.c
+++ b/libmpcodecs/vf_uspp.c
@@ -222,8 +222,7 @@ static int config(struct vf_instance *vf,
for(i=0; i< (1<<vf->priv->log2_count); i++){
AVCodecContext *avctx_enc;
- avctx_enc=
- vf->priv->avctx_enc[i]= avcodec_alloc_context();
+ avctx_enc = vf->priv->avctx_enc[i] = avcodec_alloc_context3(enc);
avctx_enc->width = width + BLOCK;
avctx_enc->height = height + BLOCK;
avctx_enc->time_base= (AVRational){1,25}; // meaningless
@@ -233,8 +232,8 @@ static int config(struct vf_instance *vf,
avctx_enc->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY;
avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL;
avctx_enc->global_quality= 123;
- avcodec_open(avctx_enc, enc);
- assert(avctx_enc->codec);
+ int res = avcodec_open2(avctx_enc, enc, NULL);
+ assert(res >= 0);
}
vf->priv->frame= avcodec_alloc_frame();
vf->priv->frame_dec= avcodec_alloc_frame();