[FFmpeg-cvslog] avcodec/nvenc: Fix build with older gcc versions
Timo Rothenpieler
git at videolan.org
Tue Jul 14 23:21:28 CEST 2015
ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Tue Jul 14 22:58:54 2015 +0200| [550e872bcd49547564414b1cef69a8de8280064d] | committer: Timo Rothenpieler
avcodec/nvenc: Fix build with older gcc versions
Aparently anonymous structs weren't always supported, not even sure if
they are standard conformant.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=550e872bcd49547564414b1cef69a8de8280064d
---
libavcodec/nvenc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 53625a2..a63c779 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) \
More information about the ffmpeg-cvslog
mailing list