diff options
author | Sam Hocevar <sam+ffmpeg@zoy.org> | 2007-03-30 23:04:45 +0000 |
---|---|---|
committer | Roberto Togni <r_togni@tiscali.it> | 2007-03-30 23:04:45 +0000 |
commit | d495fdc3d3957881e0ac774913d9ef44b3330108 (patch) | |
tree | 10da009fd1f6117893a09492919d5d2d9597e575 /libavformat/rm.c | |
parent | 09a628662dbe068d4902a910ac630260fd321efa (diff) | |
download | ffmpeg-d495fdc3d3957881e0ac774913d9ef44b3330108.tar.gz |
Do not return invalid pointer for non-audio or video streams.
Patch by Sam Hocevar sam+ffmpeg zoy org
Originally committed as revision 8564 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rm.c')
-rw-r--r-- | libavformat/rm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/rm.c b/libavformat/rm.c index b4ddf1b027..ad2f5ff27c 100644 --- a/libavformat/rm.c +++ b/libavformat/rm.c @@ -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){ |