aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/nvdec_vp8.c
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2017-11-26 20:40:32 -0800
committerPhilip Langdale <philipl@overt.org>2017-11-26 20:52:38 -0800
commitb93d96a07be40f8e5d267d55fe961285586c0fd7 (patch)
treefcd9fe39d2e65901da1558f6d0acf3f42ba2b410 /libavcodec/nvdec_vp8.c
parent8e7ac4f04903464e78b2cf374e0eacd1b531be18 (diff)
downloadffmpeg-b93d96a07be40f8e5d267d55fe961285586c0fd7.tar.gz
avcodec/nvdec: Make vp8 initialisation more 'compatible'
Ancient versions of gcc (pre 4.6) can't directly initialise members of anonymous inner unions/structs by name. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 Unfortunately, RHEL 6 shipped with one of these ancient versions and so we're stuck with it until approximately the heat death of the universe. Putting explicit braces into the initialisation is possibly a work-around but the behaviour there was never fully understood before direct initialisation was made to work. So, this may or may not work.
Diffstat (limited to 'libavcodec/nvdec_vp8.c')
-rw-r--r--libavcodec/nvdec_vp8.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/libavcodec/nvdec_vp8.c b/libavcodec/nvdec_vp8.c
index ceb3de2c3a..f29a66ac72 100644
--- a/libavcodec/nvdec_vp8.c
+++ b/libavcodec/nvdec_vp8.c
@@ -64,11 +64,20 @@ 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,
+ /*
+ * Explicit braces for anonymous inners to work around limitations
+ * in ancient versions of gcc.
+ */
+ {
+ {
+ .frame_type = !h->keyframe,
+ .version = h->profile,
+ .show_frame = !h->invisible,
+ .update_mb_segmentation_data = h->segmentation.enabled ?
+ h->segmentation.update_feature_data :
+ 0,
+ }
+ }
}
};