diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2017-04-07 11:41:27 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2017-04-10 10:16:40 +0200 |
commit | d32d59bc977b43031007bb2ab21e232f96d2ebcb (patch) | |
tree | 1cce8550831f01ac70c3a6f8a4bc50b4bace7a0f /libavformat | |
parent | 6ac0e7818399a57e4684202bac79f35b3561ad1e (diff) | |
download | ffmpeg-d32d59bc977b43031007bb2ab21e232f96d2ebcb.tar.gz |
matroska: Read only the data written in the scratch buffer
The private buffer is 20bytes but depending on the type only 12 bytes
are actually filled.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroskaenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 34d983324b..b8c434a664 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -686,7 +686,7 @@ static int mkv_write_video_projection(AVFormatContext *s, AVIOContext *pb, avio_wb32(&b, spherical->bound_left); avio_wb32(&b, spherical->bound_right); put_ebml_binary(dyn_cp, MATROSKA_ID_VIDEOPROJECTIONPRIVATE, - private, sizeof(private)); + private, avio_tell(&b)); break; case AV_SPHERICAL_CUBEMAP: ffio_init_context(&b, private, 12, 1, NULL, NULL, NULL, NULL); @@ -696,7 +696,7 @@ static int mkv_write_video_projection(AVFormatContext *s, AVIOContext *pb, avio_wb32(&b, 0); // layout avio_wb32(&b, spherical->padding); put_ebml_binary(dyn_cp, MATROSKA_ID_VIDEOPROJECTIONPRIVATE, - private, sizeof(private)); + private, avio_tell(&b)); break; default: av_log(s, AV_LOG_WARNING, "Unknown projection type\n"); |