[FFmpeg-cvslog] lavc: fix get_buffer() compatibility layer for audio.

Anton Khirnov git at videolan.org
Wed Mar 13 02:02:00 CET 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Mar 10 17:56:35 2013 +0100| [669cc0f364d69aa9bd0153eb2f926abdd5d59575] | committer: Anton Khirnov

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=669cc0f364d69aa9bd0153eb2f926abdd5d59575
---

 libavcodec/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 13efea4..0106b91 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]);



More information about the ffmpeg-cvslog mailing list