avcodec/motion_est: Set subcmp consistently for H261
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 31 Jan 2015 20:14:08 +0000 (21:14 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 31 Jan 2015 20:14:08 +0000 (21:14 +0100)
Fixes Ticket3150

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/motion_est.c

index 901fafd..749af72 100644 (file)
@@ -321,6 +321,9 @@ int ff_init_me(MpegEncContext *s){
 
     c->avctx= s->avctx;
 
+    if(s->codec_id == AV_CODEC_ID_H261)
+        c->avctx->me_sub_cmp = c->avctx->me_cmp;
+
     if(cache_size < 2*dia_size && !c->stride){
         av_log(s->avctx, AV_LOG_INFO, "ME_MAP size may be a little small for the selected diamond size\n");
     }