aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2005-06-01 12:03:25 +0000
committerMåns Rullgård <mans@mansr.com>2005-06-01 12:03:25 +0000
commitca15919699545e462301ceb00fab4f65b9e068e4 (patch)
tree00bb51c9c000ebeef85c4924ce977c9bb29e616f
parent6510f43cf3e06cb3dae4a501fb80fe59d085b4b5 (diff)
downloadffmpeg-ca15919699545e462301ceb00fab4f65b9e068e4.tar.gz
fix segfault if flush is called before the first frame
(I think that's it, and this fixes it) Originally committed as revision 4335 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/h264.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index fa419e8981..f7475d09ef 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3505,7 +3505,8 @@ static void flush_dpb(AVCodecContext *avctx){
h->delayed_pic[i]= NULL;
h->delayed_output_pic= NULL;
idr(h);
- h->s.current_picture_ptr->reference= 0;
+ if(h->s.current_picture_ptr)
+ h->s.current_picture_ptr->reference= 0;
}
/**