mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
avviddec: Correctly handle 0-sized buffers without crashing
Might e.g. be valid for Theora.
This commit is contained in:
parent
787bd57ea1
commit
f0d700d5ca
1 changed files with 2 additions and 2 deletions
|
@ -1340,8 +1340,8 @@ gst_ffmpegviddec_handle_frame (GstVideoDecoder * decoder,
|
|||
bdata = minfo.data;
|
||||
bsize = minfo.size;
|
||||
|
||||
if (!GST_MEMORY_IS_ZERO_PADDED (minfo.memory)
|
||||
|| (minfo.maxsize - minfo.size) < FF_INPUT_BUFFER_PADDING_SIZE) {
|
||||
if (bsize > 0 && (!GST_MEMORY_IS_ZERO_PADDED (minfo.memory)
|
||||
|| (minfo.maxsize - minfo.size) < FF_INPUT_BUFFER_PADDING_SIZE)) {
|
||||
/* add padding */
|
||||
if (ffmpegdec->padded_size < bsize + FF_INPUT_BUFFER_PADDING_SIZE) {
|
||||
ffmpegdec->padded_size = bsize + FF_INPUT_BUFFER_PADDING_SIZE;
|
||||
|
|
Loading…
Reference in a new issue