aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-10 17:56:35 +0100
committerAnton Khirnov <anton@khirnov.net>2013-03-10 22:19:52 +0100
commit669cc0f364d69aa9bd0153eb2f926abdd5d59575 (patch)
treec24aca7cbbd532728a449d21756ebaa4e4eeae21 /libavcodec/utils.c
parent98cec5c84feff34e04428de4a86836a83657ae5e (diff)
downloadffmpeg-669cc0f364d69aa9bd0153eb2f926abdd5d59575.tar.gz
lavc: fix get_buffer() compatibility layer for audio.
planes - FF_ARRAY_ELEMS would be evaluated as unsigned and underflow instead of being negative as was intended.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 13efea44c2..0106b91200 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -687,7 +687,7 @@ do { \
for (i = 0; i < FFMIN(planes, FF_ARRAY_ELEMS(frame->buf)); i++)
WRAP_PLANE(frame->buf[i], frame->extended_data[i], frame->linesize[0]);
- for (i = 0; i < planes - FF_ARRAY_ELEMS(frame->buf); i++)
+ for (i = 0; i < frame->nb_extended_buf; i++)
WRAP_PLANE(frame->extended_buf[i],
frame->extended_data[i + FF_ARRAY_ELEMS(frame->buf)],
frame->linesize[0]);