diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-19 21:12:30 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-19 21:12:30 +0400 |
commit | ef1d4ee2f8b621a009d482d5b183a905bcb1cd74 (patch) | |
tree | 88d5e961383f04d5c1e521242dc2e0ceb7eedd1b /libavcodec/utils.c | |
parent | af72f62d7b2ab00d6f69c0838f662beb566862d8 (diff) | |
parent | bddd8cbf68551f6405b2bf77cc3e212af9fbe834 (diff) |
Merge commit 'bddd8cbf68551f6405b2bf77cc3e212af9fbe834'
* commit 'bddd8cbf68551f6405b2bf77cc3e212af9fbe834':
Add transformation matrix API.
Conflicts:
libavcodec/avcodec.h
libavcodec/utils.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 8e813d0dbb..be2b40d45c 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -767,6 +767,16 @@ int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame) memcpy(frame_sd->data, packet_sd, size); } + + /* copy the displaymatrix to the output frame */ + packet_sd = av_packet_get_side_data(pkt, AV_PKT_DATA_DISPLAYMATRIX, &size); + if (packet_sd) { + frame_sd = av_frame_new_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX, size); + if (!frame_sd) + return AVERROR(ENOMEM); + + memcpy(frame_sd->data, packet_sd, size); + } } else { frame->pkt_pts = AV_NOPTS_VALUE; av_frame_set_pkt_pos (frame, -1); |