[FFmpeg-cvslog] audio_get_buffer: add assert to ensure nb_extended_buf has a safe value
Michael Niedermayer
git at videolan.org
Tue Mar 19 14:35:30 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 19 14:19:29 2013 +0100| [2c993fece28b41b68435e86ceb5daf53b7b78197] | committer: Michael Niedermayer
audio_get_buffer: add assert to ensure nb_extended_buf has a safe value
May silence CID991853
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2c993fece28b41b68435e86ceb5daf53b7b78197
---
libavcodec/utils.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index b031132..b245914 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -478,8 +478,10 @@ static int audio_get_buffer(AVCodecContext *avctx, AVFrame *frame)
av_freep(&frame->extended_buf);
return AVERROR(ENOMEM);
}
- } else
+ } else {
frame->extended_data = frame->data;
+ av_assert0(frame->nb_extended_buf == 0);
+ }
for (i = 0; i < FFMIN(planes, AV_NUM_DATA_POINTERS); i++) {
frame->buf[i] = av_buffer_pool_get(pool->pools[0]);
More information about the ffmpeg-cvslog
mailing list