[FFmpeg-devel] [PATCH][RFC] avcodec/pthread_frame: fix null pointer dereference
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Sat Oct 24 15:09:05 CEST 2015
Fixes CID 1322329.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
libavcodec/pthread_frame.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 7651211..ca06e3d 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -305,7 +305,7 @@ static void release_delayed_buffers(PerThreadContext *p)
pthread_mutex_lock(&fctx->buffer_mutex);
// fix extended data in case the caller screwed it up
- av_assert0(p->avctx->codec_type == AVMEDIA_TYPE_VIDEO ||
+ av_assert0(p->avctx && p->avctx->codec_type == AVMEDIA_TYPE_VIDEO ||
p->avctx->codec_type == AVMEDIA_TYPE_AUDIO);
f = &p->released_buffers[--p->num_released_buffers];
f->extended_data = f->data;
--
2.6.2
More information about the ffmpeg-devel
mailing list