Commit 0e93694e authored by Philip Langdale's avatar Philip Langdale

avcodec/nvdec: More effort to make vp8 compile with gcc < 4.6

I'm told my prefix work-around wasn't enough to make it compile,
although I'm not sure why; I did some basic testing and that
approach appeared to work, but I'm not in a position to do a
full compile on CentOS 6 so I can't be sure of anything.

I have had it confirmed that the additional change to not use
named initialisers is enough to make it compile, so let's
throw that into the mix too.
parent b93d96a0
...@@ -65,20 +65,19 @@ static int nvdec_vp8_start_frame(AVCodecContext *avctx, const uint8_t *buffer, u ...@@ -65,20 +65,19 @@ static int nvdec_vp8_start_frame(AVCodecContext *avctx, const uint8_t *buffer, u
.GoldenRefIdx = safe_get_ref_idx(h->framep[VP56_FRAME_GOLDEN]), .GoldenRefIdx = safe_get_ref_idx(h->framep[VP56_FRAME_GOLDEN]),
.AltRefIdx = safe_get_ref_idx(h->framep[VP56_FRAME_GOLDEN2]), .AltRefIdx = safe_get_ref_idx(h->framep[VP56_FRAME_GOLDEN2]),
/* /*
* Explicit braces for anonymous inners to work around limitations * Explicit braces for anonymous inners and unnamed fields
* in ancient versions of gcc. * to work around limitations in ancient versions of gcc.
*/ */
{ { // union
{ { // struct
.frame_type = !h->keyframe, !h->keyframe, // frame_type
.version = h->profile, h->profile, // version
.show_frame = !h->invisible, !h->invisible, // show_frame
.update_mb_segmentation_data = h->segmentation.enabled ? h->segmentation.enabled ? // update_mb_segmentation_data
h->segmentation.update_feature_data : h->segmentation.update_feature_data : 0,
0,
} }
} }
} }
}; };
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment