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