summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorStephen Warren <>2010-03-30 08:10:29 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-03-30 08:10:29 +0000
commit3bccd93ac0b7e5dbb4a335257eaee9d8908dad3c (patch)
tree6b2c19d479c69711a3f1e39f7fe60ed8583e5343 /libavcodec/h264.c
parente5efbafdfdffb8717cbeccced224fce4b422ee20 (diff)
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 Originally committed as revision 22728 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 44f87833cf..55a81776a0 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2577,9 +2577,11 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
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 |=