[FFmpeg-cvslog] audio_frame_queue: fix null ptr dereference
Michael Niedermayer
git at videolan.org
Tue May 15 03:03:11 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue May 15 02:15:23 2012 +0200| [3938a0eeae24a335b181d753c464cf5bab33ff01] | committer: Michael Niedermayer
audio_frame_queue: fix null ptr dereference
This happened when a frame was removed before any was added.
Fixes part of Ticket1208
Found-by: John Villamil, Piotr Bandurski and Carl Eugen Hoyos
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3938a0eeae24a335b181d753c464cf5bab33ff01
---
libavcodec/audio_frame_queue.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/audio_frame_queue.c b/libavcodec/audio_frame_queue.c
index 31cab29..999aa93 100644
--- a/libavcodec/audio_frame_queue.c
+++ b/libavcodec/audio_frame_queue.c
@@ -100,7 +100,7 @@ void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts,
if(nb_samples){
av_assert0(!afq->frame_count);
- if(afq->frames[0].pts != AV_NOPTS_VALUE)
+ if(afq->frames && afq->frames[0].pts != AV_NOPTS_VALUE)
afq->frames[0].pts += nb_samples;
av_log(afq->avctx, AV_LOG_DEBUG, "Trying to remove %d more samples than are in the que\n", nb_samples);
}
More information about the ffmpeg-cvslog
mailing list