switch to vector in mediapackets for videoomx
authorMarten Richter <marten.richter@freenet.de>
Mon, 10 Sep 2012 20:11:04 +0000 (22:11 +0200)
committerMarten Richter <marten.richter@freenet.de>
Mon, 10 Sep 2012 20:11:04 +0000 (22:11 +0200)
videoomx.cc
videoomx.h

index 63374e6091858ebd727c23dc61d951cbb616c149..55ee466cc3a97c35584f6064473b846bffa2cdb8 100644 (file)
@@ -2310,12 +2310,11 @@ void VideoOMX::PrepareMediaSample(const MediaPacketList& mplist,UINT samplepos)
 UINT VideoOMX::DeliverMediaSample(UCHAR* buffer, UINT *samplepos)
 {
        int consumed=0;
-       while (mediapackets.size()) {
-               MediaPacket mediapacket=mediapackets.front();
+       while (consumed<mediapackets.size()) {
+               MediaPacket mediapacket=mediapackets[consumed];
            DeliverMediaPacket(mediapacket, buffer, samplepos);
            if (*samplepos == mediapacket.length) {
                *samplepos = 0;
-               mediapackets.pop_front();
                consumed++;
                //return 1;
            } else return consumed;
index b4f8a42dd6924bfc52c24d3674dfbcdb87a82c93..59f0d9796f70cfd7d11f089f08725f2c01c10781 100644 (file)
@@ -261,7 +261,7 @@ class VideoOMX : public Video, public Thread_TYPE
    bool firstsynched;\r
 \r
     \r
-   MediaPacketList mediapackets;\r
+   vector<MediaPacket> mediapackets;\r
 };\r
 \r
 #endif\r