diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-28 22:23:01 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-28 22:23:01 +0200 |
commit | f30a8154abf2905b61b08974bc71f04e8d7afc68 (patch) | |
tree | 2c487d535bd7955a2c1e598a4409142790d8230e /libavcodec | |
parent | 56cc754c76d3aba81e121502d0d420242b7023b1 (diff) | |
parent | 9301486408a480629336af4d7fd873c0f28fb2d5 (diff) | |
download | ffmpeg-f30a8154abf2905b61b08974bc71f04e8d7afc68.tar.gz |
Merge commit '9301486408a480629336af4d7fd873c0f28fb2d5'
* commit '9301486408a480629336af4d7fd873c0f28fb2d5':
avcodec: add stream-level stereo3d side data
Conflicts:
doc/APIchanges
libavcodec/avcodec.h
libavcodec/utils.c
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 6 | ||||
-rw-r--r-- | libavcodec/utils.c | 10 | ||||
-rw-r--r-- | libavcodec/version.h | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index d39e7f14b5..6dd6256bcd 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1027,6 +1027,12 @@ enum AVPacketSideDataType { */ AV_PKT_DATA_DISPLAYMATRIX, + /* + * This side data should be associated with a video stream and contains + * Stereoscopic 3D information in form of the AVStereo3D struct. + */ + AV_PKT_DATA_STEREO3D, + /** * Recommmends skipping the specified number of samples * @code diff --git a/libavcodec/utils.c b/libavcodec/utils.c index a7bed06432..9d3fcfd730 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -756,6 +756,16 @@ int ff_init_buffer_info(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); + } } else { frame->pkt_pts = AV_NOPTS_VALUE; av_frame_set_pkt_pos (frame, -1); diff --git a/libavcodec/version.h b/libavcodec/version.h index 9da72abdd0..8664884099 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,8 +29,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 56 -#define LIBAVCODEC_VERSION_MINOR 0 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MINOR 1 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ |