Add hwaccel->decode_slice() call for avhwaccel by Gwenole Beauchesne.
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 25 Feb 2009 19:39:42 +0000 (19:39 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 25 Feb 2009 19:39:42 +0000 (19:39 +0000)
Originally committed as revision 17591 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h264.c

index 344cee59ab678df149d50b3305ce7f2b76a02168..03d70b7d789aacf35f4b3589241109afde9fb3d4 100644 (file)
@@ -7494,6 +7494,10 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
                && (avctx->skip_frame < AVDISCARD_BIDIR  || hx->slice_type_nos!=FF_B_TYPE)
                && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE)
                && avctx->skip_frame < AVDISCARD_ALL){
+                if(avctx->hwaccel) {
+                    if (avctx->hwaccel->decode_slice(avctx, &buf[buf_index - consumed], consumed) < 0)
+                        return -1;
+                }else
                 if(CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){
                     static const uint8_t start_code[] = {0x00, 0x00, 0x01};
                     ff_vdpau_add_data_chunk(s, start_code, sizeof(start_code));