intel / libyami-utils

Libyami Utilities
Apache License 2.0
24 stars 45 forks source link

[regression] Arbitrary initialization of VideoDecodeBuffer::flag causes incorrect AVC/HEVC decoding #134

Closed uartie closed 6 years ago

uartie commented 6 years ago

Arbitrary initialized VideoDecodeBuffer in VppInputDecode::read can result in invalid AVC/HEVC decoding since libyami commit:

commit 83f9fa79c856cebf98ca9b0d6dfc0b0acba9f443
Author: XuGuangxin <Guangxin.Xu@intel.com>
Date:   Fri May 4 12:44:00 2018 +0800

    h264, h265: add VIDEO_DECODE_BUFFER_FLAG_FRAME_END to inidicate frame end

    unless we got AUD or SPS/PPS in stream, we can't know we have a frame.
    but in up level, we may know we have entire frame. so we add a frame to
    tell decoder about this

The arbitrary value can erroneously trigger VIDEO_DECODE_BUFFER_FLAG_FRAME_END in AVC/HEVC decoder, resulting in wrong decode output or decode errors.