diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2015-07-14 22:58:54 +0200 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2015-07-14 23:00:44 +0200 |
commit | 550e872bcd49547564414b1cef69a8de8280064d (patch) | |
tree | 0d81f9ee8b479a7b77350c4af6b0c50f77a88bf6 | |
parent | 130a8e0eef2f81e0d853117e417b650c3e16d1b7 (diff) | |
download | ffmpeg-550e872bcd49547564414b1cef69a8de8280064d.tar.gz |
avcodec/nvenc: Fix build with older gcc versions
Aparently anonymous structs weren't always supported, not even sure if
they are standard conformant.
-rw-r--r-- | libavcodec/nvenc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 53625a21bd..a63c779d61 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -93,7 +93,7 @@ typedef struct NvencData union { int64_t timestamp; NvencOutputSurface *surface; - }; + } u; } NvencData; typedef struct NvencDataList @@ -296,7 +296,7 @@ static int data_queue_enqueue(NvencDataList* queue, NvencData *data) static int out_surf_queue_enqueue(NvencDataList* queue, NvencOutputSurface* surface) { NvencData data; - data.surface = surface; + data.u.surface = surface; return data_queue_enqueue(queue, &data); } @@ -308,13 +308,13 @@ static NvencOutputSurface* out_surf_queue_dequeue(NvencDataList* queue) if (!res) return NULL; - return res->surface; + return res->u.surface; } static int timestamp_queue_enqueue(NvencDataList* queue, int64_t timestamp) { NvencData data; - data.timestamp = timestamp; + data.u.timestamp = timestamp; return data_queue_enqueue(queue, &data); } @@ -326,7 +326,7 @@ static int64_t timestamp_queue_dequeue(NvencDataList* queue) if (!res) return AV_NOPTS_VALUE; - return res->timestamp; + return res->u.timestamp; } #define CHECK_LOAD_FUNC(t, f, s) \ |