diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-07-23 09:21:28 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-08-28 12:33:26 -0400 |
commit | 9301486408a480629336af4d7fd873c0f28fb2d5 (patch) | |
tree | 198fb73355d2e3890f8292b4786ef101cdfd0502 /libavcodec/utils.c | |
parent | f2583bc86eb5d7decc639fc9a36edc93e6003eef (diff) | |
download | ffmpeg-9301486408a480629336af4d7fd873c0f28fb2d5.tar.gz |
avcodec: add stream-level stereo3d side data
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index afc0396375..c5fa50d06b 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -596,6 +596,15 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) memcpy(frame_sd->data, packet_sd, size); } + /* copy the stereo3d format to the output frame */ + packet_sd = av_packet_get_side_data(pkt, AV_PKT_DATA_STEREO3D, &size); + if (packet_sd) { + frame_sd = av_frame_new_side_data(frame, AV_FRAME_DATA_STEREO3D, size); + if (!frame_sd) + return AVERROR(ENOMEM); + + memcpy(frame_sd->data, packet_sd, size); + } return 0; } |