Commit fc567ac4 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec: Add padding after the remaining AVFrames

This limits ABI issues in case libavcodec is linked to a libavutil with larger AVFrame
Which can happen if they are shiped in seperate binary packages and libavutil is upgraded

A cleaner alternative would be to replace them by pointers but this would likely cause
a small speedloss
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2765c2ec
...@@ -289,6 +289,7 @@ typedef struct MMCO { ...@@ -289,6 +289,7 @@ typedef struct MMCO {
typedef struct H264Picture { typedef struct H264Picture {
struct AVFrame f; struct AVFrame f;
uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame
ThreadFrame tf; ThreadFrame tf;
AVBufferRef *qscale_table_buf; AVBufferRef *qscale_table_buf;
......
...@@ -93,6 +93,7 @@ struct MpegEncContext; ...@@ -93,6 +93,7 @@ struct MpegEncContext;
*/ */
typedef struct Picture{ typedef struct Picture{
struct AVFrame f; struct AVFrame f;
uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame
ThreadFrame tf; ThreadFrame tf;
AVBufferRef *qscale_table_buf; AVBufferRef *qscale_table_buf;
......
...@@ -807,6 +807,7 @@ int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame) ...@@ -807,6 +807,7 @@ int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
typedef struct CompatReleaseBufPriv { typedef struct CompatReleaseBufPriv {
AVCodecContext avctx; AVCodecContext avctx;
AVFrame frame; AVFrame frame;
uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame
} CompatReleaseBufPriv; } CompatReleaseBufPriv;
static void compat_free_buffer(void *opaque, uint8_t *data) static void compat_free_buffer(void *opaque, uint8_t *data)
......
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