From 0fc9f34d94b12df9d7eef7d8ea7724f02f2670b1 Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Wed, 4 Aug 2010 15:29:26 -0700 Subject: [PATCH] Fix divide by zero. Change-Id: I3113234aa5936965424dde5b24e448df1be0b603 --- media/libstagefright/OggExtractor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libstagefright/OggExtractor.cpp b/media/libstagefright/OggExtractor.cpp index c267a23e83a93..16f094b2abd12 100644 --- a/media/libstagefright/OggExtractor.cpp +++ b/media/libstagefright/OggExtractor.cpp @@ -361,7 +361,7 @@ status_t MyVorbisExtractor::readNextPacket(MediaBuffer **out) { memcpy(tmp->data(), buffer->data(), buffer->range_length()); tmp->set_range(0, buffer->range_length()); buffer->release(); - } else { + } else if (mVi.rate) { // XXX Not only is this not technically the correct time for // this packet, we also stamp every packet in this page // with the same time. This needs fixing later.