summaryrefslogtreecommitdiff
path: root/libswscale
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-12 01:02:55 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-12 01:06:13 +0100
commitcd1c12b5c5b79195140a93d59cbf990d034f61d8 (patch)
tree1a1ab570f0dddd706a1b995e255272c1c6f9f453 /libswscale
parent289520fd97395ffd5bf933ac80487e858bc4039d (diff)
parentb498867d6691b5f1f107afd81aff403f66b434aa (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: FATE: update reference for seek-alac_mp4 sunrast: Return AVERROR values instead of -1. sunrast: Add support for gray8 decoding. swscale: enforce a minimum filtersize. alacenc: use AVCodec.encode2() alacenc: cosmetics: indentation alacenc: consolidate bitstream writing into a single function. alacenc: only encode frame size in header for a final smaller frame alacenc: store current frame size in AlacEncodeContext. alacenc: return AVERROR codes in alac_encode_frame() alacenc: calculate a new max frame size for the final small frame alacenc: pretty-printing and other cosmetics alacenc: fix error handling and potential memleaks in alac_encode_init() alacenc: do not set coded_frame->key_frame alacenc: do not set bits_per_coded_sample alacenc: remove unneeded frame_size check in alac_encode_frame() tta: error out if samplerate is zero. ttadec: fix invalid free when an error occurs while decoding 24-bit tta wavpack: add needed braces for 2 statements inside an if block Conflicts: tests/ref/acodec/alac Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index d6d90b0461..70b724e043 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -275,7 +275,7 @@ static int initFilter(int16_t **outFilter, int16_t **filterPos, int *outFilterSi
if (xInc <= 1<<16) filterSize= 1 + sizeFactor; // upscale
else filterSize= 1 + (sizeFactor*srcW + dstW - 1)/ dstW;
- if (filterSize > srcW-2) filterSize=srcW-2;
+ filterSize = av_clip(filterSize, 1, srcW - 2);
FF_ALLOC_OR_GOTO(NULL, filter, dstW*sizeof(*filter)*filterSize, fail);