diff mbox

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

Message ID 20161211033308.8592-4-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer Dec. 11, 2016, 3:33 a.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavformat/matroska.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

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;