diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-09-25 23:25:28 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-09-25 23:25:28 +0400 |
commit | 68997192ebad66fa2e068af622ee34dfea37f297 (patch) | |
tree | 38b8420adfa0fdd4148fd477955d080ea8005099 /libavcodec/error_resilience.c | |
parent | 05b90fc0c59aaac40af484f3d5a617a0404b1b4e (diff) |
Ensure that no non-existing frame is used.
Fixes issue624.
Originally committed as revision 15416 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r-- | libavcodec/error_resilience.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 381ae27171..1c9a07ca84 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -551,7 +551,7 @@ score_sum+= best_score; static int is_intra_more_likely(MpegEncContext *s){ int is_intra_likely, i, j, undamaged_count, skip_amount, mb_x, mb_y; - if(s->last_picture_ptr==NULL) return 1; //no previous frame available -> use spatial prediction + if(!s->last_picture_ptr || !s->last_picture_ptr->data[0]) return 1; //no previous frame available -> use spatial prediction undamaged_count=0; for(i=0; i<s->mb_num; i++){ |