avcodec/qsvenc_h264: declare the QSVEncContext variable before using it
authorJames Almer <jamrial@gmail.com>
Sun, 19 Jun 2016 15:04:03 +0000 (12:04 -0300)
committerJames Almer <jamrial@gmail.com>
Sun, 19 Jun 2016 15:04:03 +0000 (12:04 -0300)
Should fix compilation.

Regression introduced by commit 63adb3602d3b35c5d1df14cf1e477bc458f96b7b

Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/qsvenc_h264.c

index cd08d86..3fb5ca3 100644 (file)
@@ -43,10 +43,10 @@ typedef struct QSVH264EncContext {
 static int qsv_h264_set_encode_ctrl(AVCodecContext *avctx,
                                     const AVFrame *frame, mfxEncodeCtrl* enc_ctrl)
 {
+    QSVH264EncContext *qh264 = avctx->priv_data;
+    QSVEncContext *q = &qh264->qsv;
+
     if (q->a53_cc && frame) {
-        AVFrameSideData *side_data = NULL;
-        QSVH264EncContext *qh264 = avctx->priv_data;
-        QSVEncContext *q = &qh264->qsv;
         mfxPayload* payload;
         mfxU8* sei_data;
         size_t sei_size;