diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-05 06:14:03 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-05 06:45:10 +0400 |
commit | 599ae9995f2e66803431e9d87fab2e650f23229e (patch) | |
tree | fb622ed455f702ebba9d96f556b50a0ae3e991ce /libavcodec/x86 | |
parent | 45326cb68440ed8bfafcba6a903dce53b0000905 (diff) |
ff_emulated_edge_mc: fix handling of w/h being 0
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86')
-rw-r--r-- | libavcodec/x86/dsputil_mmx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index 3fb9d211b5..e722d8ab62 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -1675,6 +1675,9 @@ static av_always_inline void emulated_edge_mc(uint8_t *buf, const uint8_t *src, { int start_y, start_x, end_y, end_x, src_y_add = 0; + if(!w || !h) + return; + if (src_y >= h) { src -= src_y*linesize; src_y_add = h - 1; |