diff options
author | Linjie Fu <linjie.fu@intel.com> | 2018-10-16 04:36:13 +0300 |
---|---|---|
committer | Zhong Li <zhong.li@intel.com> | 2018-11-06 12:42:29 +0300 |
commit | 87368884a52b09eef96190ff1654d56591ec7038 (patch) | |
tree | 557e1e78f2e4cc678f18173970d04fc1fd9548f8 /libavcodec/qsvdec.h | |
parent | beaa350e24167f4ff31275a6114693f5ce7cd409 (diff) |
lavc/qsvdec: flush buffered data before reinit
Flush the buffered data in libmfx before video param reinit
in case the frames drop.
Cache the first frame causing the reinit and decode zero-size
pkt to flush the buffered pkt before reinit. After all the
buffered pkts being flushed, resume to reinit and decode.
Fix the issue in ticket #7399.
[V2]: Move the definition of zero_pkt to where it is exactly
used.
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
Diffstat (limited to 'libavcodec/qsvdec.h')
-rw-r--r-- | libavcodec/qsvdec.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/qsvdec.h b/libavcodec/qsvdec.h index 5b7b03a48b..111536caba 100644 --- a/libavcodec/qsvdec.h +++ b/libavcodec/qsvdec.h @@ -53,6 +53,8 @@ typedef struct QSVContext { AVFifoBuffer *async_fifo; int zero_consume_run; + int buffered_count; + int reinit_flag; // the internal parser and codec context for parsing the data AVCodecParserContext *parser; |