aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-18 00:08:54 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-23 20:31:05 +0100
commit0c88d539f8284d8625749febffd9e7ca8ef2b3be (patch)
tree9c6bdacf330c76c2a5e007edd9d7cdc31acd00c9 /libavcodec
parente39a992bd155455aebe07353c34a3e29b3b79f70 (diff)
downloadffmpeg-0c88d539f8284d8625749febffd9e7ca8ef2b3be.tar.gz
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: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit fc567ac49e17151f00f31b59030cd10f952612ef) Conflicts: libavcodec/h264.h (cherry picked from commit 618d062bd553a7d7fad194d4236913f2b0a0251e) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.h1
-rw-r--r--libavcodec/utils.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 92aac6d18a..0811e62afb 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -99,6 +99,7 @@ struct MpegEncContext;
*/
typedef struct Picture{
struct AVFrame f;
+ uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame
ThreadFrame tf;
AVBufferRef *qscale_table_buf;
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index cd04ca2aaf..19df3cc748 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -807,6 +807,7 @@ int avcodec_default_get_buffer(AVCodecContext *avctx, AVFrame *frame)
typedef struct CompatReleaseBufPriv {
AVCodecContext avctx;
AVFrame frame;
+ uint8_t avframe_padding[1024]; // hack to allow linking to a avutil with larger AVFrame
} CompatReleaseBufPriv;
static void compat_free_buffer(void *opaque, uint8_t *data)