diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-18 00:08:54 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-23 15:10:06 +0200 |
commit | 2b5b21dbaca07794a8c24d2c9095117a9958f6fa (patch) | |
tree | b65575474cff7054464fb6e845c5650cbb5a9065 | |
parent | 4201c7454551c87364a4cdcaed638b01520af635 (diff) | |
download | ffmpeg-2b5b21dbaca07794a8c24d2c9095117a9958f6fa.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>
-rw-r--r-- | libavcodec/mpegvideo.h | 1 | ||||
-rw-r--r-- | libavcodec/utils.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 3e5ee1a082..0d3a8fea1f 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -96,6 +96,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 b056e834bd..c343bf1caf 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -780,6 +780,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) |