diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-11-04 12:38:41 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-11-04 12:38:41 +0400 |
commit | 3867763d73a00a8538909614e836dc49ce9d1304 (patch) | |
tree | fd2f164560ff7224b9cb883d73f27be9d56291ce /decoder/LAVVideo | |
parent | d807ef7324a68a5af287b9ab79af6ad24d708e08 (diff) |
Ensure the decoder is properly flushed.
If the parser outputs data on flushing, we need to flush again to properly flush the decoder with NULL as well.
Diffstat (limited to 'decoder/LAVVideo')
-rw-r--r-- | decoder/LAVVideo/decoders/avcodec.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/LAVVideo/decoders/avcodec.cpp b/decoder/LAVVideo/decoders/avcodec.cpp index a290d215..ec6bd2d2 100644 --- a/decoder/LAVVideo/decoders/avcodec.cpp +++ b/decoder/LAVVideo/decoders/avcodec.cpp @@ -998,7 +998,8 @@ STDMETHODIMP CDecAvcodec::Decode(const BYTE *buffer, int buflen, REFERENCE_TIME } if (!got_picture || !m_pFrame->data[0]) { - bFlush = FALSE; // End flushing, no more frames + if (!avpkt.size) + bFlush = FALSE; // End flushing, no more frames continue; } |