In an attempt to reduce the number of global variables in
testMPEG2TransportStreamer.cpp, I made videoSource a local variable in
play(), then said
Medium::close(videoSink->source());
in afterPlaying().
This appears to work, but if you watch the FD count, it goes up by one
per pass through play().
On investigating, I discovered that videoSink->source() does not return
the same pointer as was passed to videoSink->startPlaying()! This
apparently results in the ByteStreamFileSource instance not being
cleaned up, which explains the handle leak.
This leak is mostly harmless...until you try to play a 6-second video in
a continuous loop for 14 hours. :) The default FD limit of 1024 on
Linux gets exhausted in about 2 hours.
Is this all as expected, by design, or is Medium::close() not as smart
as it should be about chasing down unused resources?
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel