[SCM] libav/experimental: rmdec: fix crash at end of file

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:41:33 UTC 2013


The following commit has been merged in the experimental branch:
commit c3df4a3bfefbab046829bb1fc7d7a2d85e4344fc
Author: Måns Rullgård <mans at mansr.com>
Date:   Mon Mar 16 20:22:39 2009 +0000

    rmdec: fix crash at end of file
    
    Originally committed as revision 18018 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 4ec6d88..a1c0906 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -774,7 +774,8 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
                 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))

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list