changeset 8278:24a49d3fdc3b libavcodec

Do not attempt to decode RV30/40 B-frames without anchors. This fixes issue 747.
author kostya
date Sun, 07 Dec 2008 16:30:08 +0000
parents a793f9afd5cb
children 6c2dcc1410bb
files rv34.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rv34.c	Sun Dec 07 00:58:41 2008 +0000
+++ b/rv34.c	Sun Dec 07 16:30:08 2008 +0000
@@ -1406,6 +1406,8 @@
             }else
                 r->si.end = si.start;
         }
+        if(!i && si.type == FF_B_TYPE && (!s->last_picture_ptr || !s->last_picture_ptr->data[0]))
+            return -1;
         last = rv34_decode_slice(r, r->si.end, buf + offset, size);
         s->mb_num_left = r->s.mb_x + r->s.mb_y*r->s.mb_width - r->si.start;
         if(last)