News:

--

Main Menu

MpegPS demuxer leaks audio tracks

Started by ajschult, December 17, 2012, 04:28:47 AM

Previous topic - Next topic

ajschult

psHeader::close should delete the elements of listOfAudioTracks, which would otherwise leak with their entrained (large) stream and access fields.


Index: avidemux_plugins/ADM_demuxers/MpegPS/ADM_ps.cpp
===================================================================
--- avidemux_plugins/ADM_demuxers/MpegPS/ADM_ps.cpp     (revision 8312)
+++ avidemux_plugins/ADM_demuxers/MpegPS/ADM_ps.cpp     (working copy)
@@ -177,6 +177,13 @@ uint8_t psHeader::close(void)
         delete psPacket;
         psPacket=NULL;
     }
+    nb=listOfAudioTracks.size();
+    for(int i=0;i<nb;i++)
+    {
+        delete listOfAudioTracks[i];
+        listOfAudioTracks[i] = 0;
+    }
+    listOfAudioTracks.clear();
     return 1;
}
/**

mean