fix vdpau vc1 interlace modes
[ffmpeg.git] / libavcodec / vdpau_vc1.c
index 7c75243..993ef26 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;
 
     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;
     info->postprocflag      = v->postprocflag;
     info->pulldown          = v->broadcast;
     info->interlace         = v->interlace;
@@ -112,7 +112,7 @@ AVHWAccel ff_wmv3_vdpau_hwaccel = {
     .id             = AV_CODEC_ID_WMV3,
     .pix_fmt        = AV_PIX_FMT_VDPAU,
     .start_frame    = vdpau_vc1_start_frame,
     .id             = AV_CODEC_ID_WMV3,
     .pix_fmt        = AV_PIX_FMT_VDPAU,
     .start_frame    = vdpau_vc1_start_frame,
-    .end_frame      = ff_vdpau_common_end_frame,
+    .end_frame      = ff_vdpau_mpeg_end_frame,
     .decode_slice   = vdpau_vc1_decode_slice,
 };
 #endif
     .decode_slice   = vdpau_vc1_decode_slice,
 };
 #endif
@@ -123,6 +123,6 @@ AVHWAccel ff_vc1_vdpau_hwaccel = {
     .id             = AV_CODEC_ID_VC1,
     .pix_fmt        = AV_PIX_FMT_VDPAU,
     .start_frame    = vdpau_vc1_start_frame,
     .id             = AV_CODEC_ID_VC1,
     .pix_fmt        = AV_PIX_FMT_VDPAU,
     .start_frame    = vdpau_vc1_start_frame,
-    .end_frame      = ff_vdpau_common_end_frame,
+    .end_frame      = ff_vdpau_mpeg_end_frame,
     .decode_slice   = vdpau_vc1_decode_slice,
 };
     .decode_slice   = vdpau_vc1_decode_slice,
 };