Skip to content
Snippets Groups Projects
Commit 73a8612a authored by Chris Pearce's avatar Chris Pearce
Browse files

Bug 973710 - Drain MP4Reader's decoders on EOS. r=kinetik

parent d4f9efee
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,6 @@ namespace mozilla {
// Uncomment to enable verbose per-sample logging.
//#define LOG_SAMPLE_DECODE 1
#ifdef LOG_SAMPLE_DECODE
static const char*
TrackTypeToStr(TrackType aTrack)
{
......@@ -53,7 +52,6 @@ TrackTypeToStr(TrackType aTrack)
return "Unknown";
}
}
#endif
class MP4Stream : public Stream {
public:
......@@ -351,9 +349,8 @@ MP4Reader::Decode(TrackType aTrack)
if (!compressed) {
// EOS, or error. Let the state machine know there are no more
// frames coming.
#ifdef LOG_SAMPLE_DECODE
LOG("PopSample %s nullptr", TrackTypeToStr(aTrack));
#endif
LOG("Draining %s", TrackTypeToStr(aTrack));
data.mDecoder->Drain();
return false;
} else {
#ifdef LOG_SAMPLE_DECODE
......
......@@ -179,6 +179,8 @@ public:
// that are required to decode samples that it expects to get in future.
// This is called when the demuxer reaches end of stream.
// The MP4Reader will not call Input() while it's calling Drain().
// This function is synchronous. Once it's returned, all samples to be
// output should have been returned via callback to the MP4Reader.
virtual nsresult Drain() = 0;
// Cancels all init/input/drain operations, and shuts down the
......
......@@ -120,7 +120,7 @@ WMFMediaDataDecoder::ProcessDrain()
{
// Order the decoder to drain...
if (FAILED(mDecoder->SendMFTMessage(MFT_MESSAGE_COMMAND_DRAIN, 0))) {
NS_WARNING("Failed to send DRAIN command to audio MFT");
NS_WARNING("Failed to send DRAIN command to MFT");
}
// Then extract all available output.
ProcessOutput();
......
......@@ -205,7 +205,7 @@ WMFVideoMFTManager::ConfigureVideoFrameGeometry()
mVideoHeight = height;
mPictureRegion = pictureRegion;
LOG("WMFReader frame geometry frame=(%u,%u) stride=%u picture=(%d, %d, %d, %d) display=(%d,%d) PAR=%d:%d",
LOG("WMFVideoMFTManager frame geometry frame=(%u,%u) stride=%u picture=(%d, %d, %d, %d) display=(%d,%d) PAR=%d:%d",
width, height,
mVideoStride,
mPictureRegion.x, mPictureRegion.y, mPictureRegion.width, mPictureRegion.height,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment