summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vf_uspp.c
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-03-05 22:24:57 +0100
committerwm4 <wm4@mplayer2.org>2012-03-05 22:24:57 +0100
commit8dc0743571630a08fd40fa88aa09b12b4ce65bf2 (patch)
treee1c4465768635d77954b5fd21ae726444ee4f48a /libmpcodecs/vf_uspp.c
parentaebdf4f153438497b9310bd1417b5216f07e043b (diff)
parentafecdb681bed81b5df0ed18a300c68be603dfdf9 (diff)
downloadmpv-8dc0743571630a08fd40fa88aa09b12b4ce65bf2.tar.bz2
mpv-8dc0743571630a08fd40fa88aa09b12b4ce65bf2.tar.xz
Merge remote-tracking branch 'origin/master' into my_master
Conflicts: mplayer.c screenshot.c
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();