[FFmpeg-devel] [PATCH 4/6] avformat/matroska: use av_stereo3d_alloc2()

James Almer jamrial at gmail.com
Sun Dec 11 05:33:06 EET 2016


Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavformat/matroska.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index f3e1be7..259e50f 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -151,9 +151,10 @@ const char * const ff_matroska_video_stereo_plane[MATROSKA_VIDEO_STEREO_PLANE_CO
 int ff_mkv_stereo3d_conv(AVStream *st, MatroskaVideoStereoModeType stereo_mode)
 {
     AVStereo3D *stereo;
+    size_t stereo3d_size;
     int ret;
 
-    stereo = av_stereo3d_alloc();
+    stereo = av_stereo3d_alloc2(&stereo3d_size);
     if (!stereo)
         return AVERROR(ENOMEM);
 
@@ -195,7 +196,7 @@ int ff_mkv_stereo3d_conv(AVStream *st, MatroskaVideoStereoModeType stereo_mode)
     }
 
     ret = av_stream_add_side_data(st, AV_PKT_DATA_STEREO3D, (uint8_t *)stereo,
-                                  sizeof(*stereo));
+                                  stereo3d_size);
     if (ret < 0) {
         av_freep(&stereo);
         return ret;
-- 
2.10.2



More information about the ffmpeg-devel mailing list