@@ -181,6 +181,7 @@ typedef struct MOVStreamContext {
int32_t *display_matrix;
AVStereo3D *stereo3d;
+ size_t stereo3d_size;
AVSphericalMapping *spherical;
size_t spherical_size;
@@ -4535,7 +4535,7 @@ static int mov_read_st3d(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return 0;
}
- sc->stereo3d = av_stereo3d_alloc();
+ sc->stereo3d = av_stereo3d_alloc2(&sc->stereo3d_size);
if (!sc->stereo3d)
return AVERROR(ENOMEM);
@@ -4670,7 +4670,7 @@ static int mov_parse_uuid_spherical(MOVStreamContext *sc, AVIOContext *pb, size_
else
mode = AV_STEREO3D_2D;
- sc->stereo3d = av_stereo3d_alloc();
+ sc->stereo3d = av_stereo3d_alloc2(&sc->stereo3d_size);
if (!sc->stereo3d)
goto out;
@@ -5933,7 +5933,7 @@ static int mov_read_header(AVFormatContext *s)
if (sc->stereo3d) {
err = av_stream_add_side_data(st, AV_PKT_DATA_STEREO3D,
(uint8_t *)sc->stereo3d,
- sizeof(*sc->stereo3d));
+ sc->stereo3d_size);
if (err < 0)
return err;
Signed-off-by: James Almer <jamrial@gmail.com> --- libavformat/isom.h | 1 + libavformat/mov.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)