aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-06-21 23:51:45 -0300
committerJames Almer <jamrial@gmail.com>2024-06-25 00:01:11 -0300
commit74035aaed7ab43a911842059cefd1101f5d65d09 (patch)
tree6cc2e4ea58b713a58dec7cbb140fde1cbdc6ae3e /libavformat
parentf6b29c877321f38183905d38aeeae8a76d3b81da (diff)
downloadffmpeg-74035aaed7ab43a911842059cefd1101f5d65d09.tar.gz
avformat/matroskadec: 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/matroskadec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 6bc5fa621e..d1a135ed63 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2253,8 +2253,9 @@ static int mkv_stereo3d_conv(AVStream *st, MatroskaVideoStereoModeType stereo_mo
STEREOMODE_STEREO3D_MAPPING(STEREO_MODE_CONV, NOTHING)
};
AVStereo3D *stereo;
+ size_t size;
- stereo = av_stereo3d_alloc();
+ stereo = av_stereo3d_alloc_size(&size);
if (!stereo)
return AVERROR(ENOMEM);
@@ -2262,7 +2263,7 @@ static int mkv_stereo3d_conv(AVStream *st, MatroskaVideoStereoModeType stereo_mo
stereo->flags = stereo_mode_conv[stereo_mode].flags;
if (!av_packet_side_data_add(&st->codecpar->coded_side_data, &st->codecpar->nb_coded_side_data,
- AV_PKT_DATA_STEREO3D, stereo, sizeof(*stereo), 0)) {
+ AV_PKT_DATA_STEREO3D, stereo, size, 0)) {
av_freep(&stereo);
return AVERROR(ENOMEM);
}