Bug 1188871: P2. Call DrainComplete should an error occurs while draining. r=snorp

Part 1 prevented draining when an error occurred first. This handles the case where an error occurs during draining.
This commit is contained in:
Jean-Yves Avenard 2015-08-13 08:25:23 +10:00
parent c6fcd44f2d
commit 144aceffe9

View File

@ -393,6 +393,10 @@ nsresult MediaCodecDataDecoder::InitDecoder(Surface::Param aSurface)
#define HANDLE_DECODER_ERROR() \
if (NS_FAILED(res)) { \
NS_WARNING("exiting decoder loop due to exception"); \
if (mDraining) { \
ENVOKE_CALLBACK(DrainComplete); \
mDraining = false; \
} \
ENVOKE_CALLBACK(Error); \
break; \
}