diff h264.c @ 11555:e603f624b03f libavcodec

Set VDPAU H264 picture parameter field_order_cnt and frame_num at the start of decoding a picture instead of at the end. Fixes mmco01.264 Patch by Stephen Warren
author cehoyos
date Tue, 30 Mar 2010 08:10:29 +0000
parents e9640e8aeea3
children 44c5c540722c
line wrap: on
line diff
--- a/h264.c	Tue Mar 30 07:52:44 2010 +0000
+++ b/h264.c	Tue Mar 30 08:10:29 2010 +0000
@@ -2577,9 +2577,11 @@
             avctx->profile = hx->sps.profile_idc;
             avctx->level   = hx->sps.level_idc;
 
-            if (s->avctx->hwaccel && h->current_slice == 1) {
-                if (s->avctx->hwaccel->start_frame(s->avctx, NULL, 0) < 0)
+            if (h->current_slice == 1) {
+                if (s->avctx->hwaccel && s->avctx->hwaccel->start_frame(s->avctx, NULL, 0) < 0)
                     return -1;
+                if(CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
+                    ff_vdpau_h264_picture_start(s);
             }
 
             s->current_picture_ptr->key_frame |=