changeset 2052:4032a03192ec libavcodec

infinite loop fix
author michael
date Thu, 03 Jun 2004 14:17:59 +0000
parents b432d6a4c7ca
children c46e203dd698
files h263dec.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/h263dec.c	Tue Jun 01 11:53:03 2004 +0000
+++ b/h263dec.c	Thu Jun 03 14:17:59 2004 +0000
@@ -651,7 +651,7 @@
     s->current_picture.key_frame= s->pict_type == I_TYPE;
 
     /* skip b frames if we dont have reference frames */
-    if(s->last_picture_ptr==NULL && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size);
+    if(s->last_picture_ptr==NULL && (s->pict_type==B_TYPE || s->dropable)) return get_consumed_bytes(s, buf_size);
     /* skip b frames if we are in a hurry */
     if(avctx->hurry_up && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size);
     /* skip everything if we are in a hurry>=5 */