vdpau: Fix VC-1 interlaced mode
authorRainer Hochecker <fernetmenta@online.de>
Wed, 24 Jul 2013 16:50:42 +0000 (19:50 +0300)
committerDiego Biurrun <diego@biurrun.de>
Thu, 25 Jul 2013 12:19:17 +0000 (14:19 +0200)
VDPAU expects the bitstream value (0, 2 or 3).
libavcodec uses an enum (0, 1 or 2).

Signed-off-by: RĂ©mi Denis-Courmont <remi@remlab.net>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
libavcodec/vdpau_vc1.c

index 4d84cd2..57d50fb 100644 (file)
@@ -59,7 +59,7 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx,
     else
         info->picture_type  = s->pict_type - 1 + s->pict_type / 3;
 
-    info->frame_coding_mode = v->fcm;
+    info->frame_coding_mode = v->fcm ? (v->fcm + 1) : 0;
     info->postprocflag      = v->postprocflag;
     info->pulldown          = v->broadcast;
     info->interlace         = v->interlace;