[Ffmpeg-cvslog] r8564 - trunk/libavformat/rm.c

rtogni subversion
Sat Mar 31 01:04:45 CEST 2007


Author: rtogni
Date: Sat Mar 31 01:04:45 2007
New Revision: 8564

Modified:
   trunk/libavformat/rm.c

Log:
Does not return invalid pointer for non-audio or video streams
Patch by Sam Hocevar sam+ffmpeg zoy org


Modified: trunk/libavformat/rm.c
==============================================================================
--- trunk/libavformat/rm.c	(original)
+++ trunk/libavformat/rm.c	Sat Mar 31 01:04:45 2007
@@ -954,9 +954,8 @@ resync:
                 len=len2;
             rm->remaining_len-= len;
             av_get_packet(pb, pkt, len);
-        }
 
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
             if ((st->codec->codec_id == CODEC_ID_RA_288) ||
                 (st->codec->codec_id == CODEC_ID_COOK)) {
                 int x;
@@ -1008,7 +1007,9 @@ resync:
                 }
             } else
                 av_get_packet(pb, pkt, len);
-        }
+
+        } else
+            av_get_packet(pb, pkt, len);
 
         if(  (st->discard >= AVDISCARD_NONKEY && !(flags&2))
            || st->discard >= AVDISCARD_ALL){




More information about the ffmpeg-cvslog mailing list