diff options
author | James Almer <jamrial@gmail.com> | 2024-06-21 23:50:48 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-06-25 00:01:11 -0300 |
commit | f6b29c877321f38183905d38aeeae8a76d3b81da (patch) | |
tree | c40a95b48bf6ff3db202f89eda483ef9a5fe7b7a /libavformat | |
parent | 7c0ebb095d98ba4b08b9014ccb4c44816fdb81ea (diff) | |
download | ffmpeg-f6b29c877321f38183905d38aeeae8a76d3b81da.tar.gz |
avformat/mov: don't use sizeof(AVStereo3D)
It's not part of the libavutil ABI.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/isom.h | 1 | ||||
-rw-r--r-- | libavformat/mov.c | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/isom.h b/libavformat/isom.h index 35b767a52c..a0498f45e5 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -247,6 +247,7 @@ typedef struct MOVStreamContext { int32_t *display_matrix; AVStereo3D *stereo3d; + size_t stereo3d_size; AVSphericalMapping *spherical; size_t spherical_size; AVMasteringDisplayMetadata *mastering; diff --git a/libavformat/mov.c b/libavformat/mov.c index fe8a963c6e..b4245789c4 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -6332,7 +6332,7 @@ static int mov_read_st3d(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; } - sc->stereo3d = av_stereo3d_alloc(); + sc->stereo3d = av_stereo3d_alloc_size(&sc->stereo3d_size); if (!sc->stereo3d) return AVERROR(ENOMEM); @@ -6691,7 +6691,7 @@ static int mov_read_eyes(MOVContext *c, AVIOContext *pb, MOVAtom atom) } if (!sc->stereo3d) { - sc->stereo3d = av_stereo3d_alloc(); + sc->stereo3d = av_stereo3d_alloc_size(&sc->stereo3d_size); if (!sc->stereo3d) return AVERROR(ENOMEM); } @@ -6777,7 +6777,7 @@ static int mov_read_hfov(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (!sc->stereo3d) { - sc->stereo3d = av_stereo3d_alloc(); + sc->stereo3d = av_stereo3d_alloc_size(&sc->stereo3d_size); if (!sc->stereo3d) return AVERROR(ENOMEM); } @@ -6827,7 +6827,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_alloc_size(&sc->stereo3d_size); if (!sc->stereo3d) goto out; @@ -10028,7 +10028,7 @@ static int mov_read_header(AVFormatContext *s) if (sc->stereo3d) { if (!av_packet_side_data_add(&st->codecpar->coded_side_data, &st->codecpar->nb_coded_side_data, AV_PKT_DATA_STEREO3D, - (uint8_t *)sc->stereo3d, sizeof(*sc->stereo3d), 0)) + (uint8_t *)sc->stereo3d, sc->stereo3d_size, 0)) return AVERROR(ENOMEM); sc->stereo3d = NULL; |