mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
avviddec: take the maximum of the height/coded_height
Otherwise, some h.264 streams (particularly with cropping information) may cause memory corruption after a renegotiation to a smaller size when decoded and then ffmpeg writes past the end of the buffer. Fixes: https://gitlab.freedesktop.org/gstreamer/gst-libav/-/issues/80 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/110>
This commit is contained in:
parent
f166c9d234
commit
1d33d1c8ea
1 changed files with 1 additions and 1 deletions
|
@ -682,7 +682,7 @@ gst_ffmpegvideodec_prepare_dr_pool (GstFFMpegVidDec * ffmpegdec,
|
|||
gsize max_align;
|
||||
|
||||
width = GST_VIDEO_INFO_WIDTH (info);
|
||||
height = GST_VIDEO_INFO_HEIGHT (info);
|
||||
height = MAX (GST_VIDEO_INFO_HEIGHT (info), ffmpegdec->context->coded_height);
|
||||
|
||||
/* let ffmpeg find the alignment and padding */
|
||||
avcodec_align_dimensions2 (ffmpegdec->context, &width, &height,
|
||||
|
|
Loading…
Reference in a new issue