diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-19 14:19:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-19 14:33:47 +0100 |
commit | 2c993fece28b41b68435e86ceb5daf53b7b78197 (patch) | |
tree | 150790225175f0702c4d6cfef30cf471c0d04557 | |
parent | fdda9b440c0a0b1a8e2b08ddf1c37e98c26e6296 (diff) | |
download | ffmpeg-2c993fece28b41b68435e86ceb5daf53b7b78197.tar.gz |
audio_get_buffer: add assert to ensure nb_extended_buf has a safe value
May silence CID991853
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index b03113201f..b245914331 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]); |