diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-04-17 19:07:26 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-04-17 19:07:26 +0200 |
commit | 010871cb779a14ef5c65cc3e3ec1f9ff4a4e7738 (patch) | |
tree | 21435bf647a2e110c24a6ea65ab223aee01b4d92 /ext | |
parent | 11db4588a673fe8ae2aeb38dafa1d025c0774e46 (diff) |
ffmpegdec: resize padding buffer when it's small
Only resize the padding buffer when the size is too small, when it's just right,
we don't need to call realloc.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ffmpeg/gstffmpegdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/ffmpeg/gstffmpegdec.c b/ext/ffmpeg/gstffmpegdec.c index 99c311e..d427248 100644 --- a/ext/ffmpeg/gstffmpegdec.c +++ b/ext/ffmpeg/gstffmpegdec.c @@ -2340,7 +2340,7 @@ gst_ffmpegdec_chain (GstPad * pad, GstBuffer * inbuf) if (ffmpegdec->do_padding) { /* add padding */ - if (ffmpegdec->padded_size <= size + FF_INPUT_BUFFER_PADDING_SIZE) { + if (ffmpegdec->padded_size < size + FF_INPUT_BUFFER_PADDING_SIZE) { ffmpegdec->padded_size = size + FF_INPUT_BUFFER_PADDING_SIZE; ffmpegdec->padded = g_realloc (ffmpegdec->padded, ffmpegdec->padded_size); |