]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_parse.c
qsvdec: only access hwaccel_context is the pixel format is QSV
[ffmpeg] / libavcodec / h264_parse.c
index 052e8e41d9bcb2eaf3f5ca290d9d8cf3438923eb..d694558ecc53a9a4b876d0f48a4cbc89819a7986 100644 (file)
@@ -20,7 +20,9 @@
 #include "get_bits.h"
 #include "golomb.h"
 #include "h264.h"
+#include "h264dec.h"
 #include "h264_parse.h"
+#include "h264_ps.h"
 
 int ff_h264_pred_weight_table(GetBitContext *gb, const SPS *sps,
                               const int *ref_count, int slice_type_nos,
@@ -328,12 +330,12 @@ static int decode_extradata_ps(const uint8_t *data, int size, H264ParamSets *ps,
     for (i = 0; i < pkt.nb_nals; i++) {
         H2645NAL *nal = &pkt.nals[i];
         switch (nal->type) {
-        case NAL_SPS:
+        case H264_NAL_SPS:
             ret = ff_h264_decode_seq_parameter_set(&nal->gb, logctx, ps);
             if (ret < 0)
                 goto fail;
             break;
-        case NAL_PPS:
+        case H264_NAL_PPS:
             ret = ff_h264_decode_picture_parameter_set(&nal->gb, logctx, ps,
                                                        nal->size_bits);
             if (ret < 0)