diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index e906121697..4d8c6a4e7b 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -643,10 +643,19 @@ unk_pixfmt:
return AVERROR_BUG;
}
+#if 0
if (s->avctx->pix_fmt == AV_PIX_FMT_YUVJ420P)
s->avctx->pix_fmt = AV_PIX_FMT_YUV420P;
if (s->avctx->pix_fmt == AV_PIX_FMT_YUVJ422P)
s->avctx->pix_fmt = AV_PIX_FMT_YUV422P;
+#endif
+
+ av_log(s->avctx, AV_LOG_ERROR, "pix_fmt: %s\n",
+ av_get_pix_fmt_name(s->avctx->pix_fmt));
+ av_log(s->avctx, AV_LOG_ERROR, "hw_pix_fmt: %s\n",
+ av_get_pix_fmt_name(s->hwaccel_pix_fmt));
+ av_log(s->avctx, AV_LOG_ERROR, "sw_pix_fmt: %s\n",
+ av_get_pix_fmt_name(s->hwaccel_sw_pix_fmt));
if (s->avctx->pix_fmt == s->hwaccel_sw_pix_fmt) {
s->avctx->pix_fmt = s->hwaccel_pix_fmt;
diff --git a/libavcodec/nvdec_vp8.c b/libavcodec/nvdec_vp8.c
index ceb3de2c3a..9aa57edc7e 100644
--- a/libavcodec/nvdec_vp8.c
+++ b/libavcodec/nvdec_vp8.c
@@ -37,6 +37,7 @@ static int nvdec_vp8_start_frame(AVCodecContext *avctx, const uint8_t *buffer, u
NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
CUVIDPICPARAMS *pp = &ctx->pic_params;
+ CUVIDVP8PICPARAMS *ppc = &pp->CodecSpecific.vp8;
FrameDecodeData *fdd;
NVDECFrame *cf;
AVFrame *cur_frame = h->framep[VP56_FRAME_CURRENT]->tf.f;
@@ -64,14 +65,19 @@ static int nvdec_vp8_start_frame(AVCodecContext *avctx, const uint8_t *buffer, u
.LastRefIdx = safe_get_ref_idx(h->framep[VP56_FRAME_PREVIOUS]),
.GoldenRefIdx = safe_get_ref_idx(h->framep[VP56_FRAME_GOLDEN]),
.AltRefIdx = safe_get_ref_idx(h->framep[VP56_FRAME_GOLDEN2]),
-
- .frame_type = !h->keyframe,
- .version = h->profile,
- .show_frame = !h->invisible,
- .update_mb_segmentation_data = h->segmentation.enabled ? h->segmentation.update_feature_data : 0,
}
};
+ /*
+ * Initialise anonymous bitfield dynamically because static initialization
+ * isn't available in the decrepid version of gcc that shipped in RHEL6,
+ * which was already ancient when they first shipped it.
+ */
+ ppc->frame_type = !h->keyframe;
+ ppc->version = h->profile;
+ ppc->show_frame = !h->invisible;
+ ppc->update_mb_segmentation_data = h->segmentation.enabled ?
+ h->segmentation.update_feature_data : 0;
return 0;
}