diff options
author | wm4 <wm4@nowhere> | 2017-10-16 17:24:07 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-10-16 17:24:07 +0200 |
commit | 2defa64d3bad1e1ebe3254e3e7968b9305042ab9 (patch) | |
tree | d8961e08bf160b1b524c1d7be44c4a578eba1d76 | |
parent | ddfccd67d5da2f6b19f0057c89e3c497d248e212 (diff) | |
download | mpv-2defa64d3bad1e1ebe3254e3e7968b9305042ab9.tar.bz2 mpv-2defa64d3bad1e1ebe3254e3e7968b9305042ab9.tar.xz |
av_common: fix Libav build
Fucking shit.
-rw-r--r-- | common/av_common.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/av_common.c b/common/av_common.c index d3237250ef..1520b7ee1e 100644 --- a/common/av_common.c +++ b/common/av_common.c @@ -353,6 +353,7 @@ int mp_set_avopts(struct mp_log *log, void *avobj, char **kv) return success; } +#if LIBAVUTIL_VERSION_MICRO >= 100 AVFrameSideData *ffmpeg_garbage(AVFrame *frame, enum AVFrameSideDataType type, AVBufferRef *buf) @@ -387,3 +388,15 @@ fail: av_buffer_unref(&buf); return NULL; } +#else +AVFrameSideData *ffmpeg_garbage(AVFrame *frame, + enum AVFrameSideDataType type, + AVBufferRef *buf) +{ + AVFrameSideData *sd = av_frame_new_side_data(frame, type, buf->size); + if (sd) + memcpy(sd->data, buf->data, buf->size); + av_buffer_unref(&buf); + return sd; +} +#endif |