changeset 4741:4f53f8346307 libavformat

rmdec: fix crash at end of file
author mru
date Mon, 16 Mar 2009 20:22:39 +0000
parents 07ac6d6584a1
children 0496cbd94374
files rmdec.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rmdec.c	Mon Mar 16 16:24:38 2009 +0000
+++ b/rmdec.c	Mon Mar 16 20:22:39 2009 +0000
@@ -774,7 +774,8 @@
                 flags = (seq++ == 1) ? 2 : 0;
             } else {
                 len=sync(s, &timestamp, &flags, &i, &pos);
-                st = s->streams[i];
+                if (len > 0)
+                    st = s->streams[i];
             }
 
             if(len<0 || url_feof(s->pb))