diff options
author | wm4 <wm4@nowhere> | 2019-10-25 21:50:10 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-10-25 21:50:10 +0200 |
commit | 52536aaa7b2cd1b8fe6b0d197f13aeb907aa7bea (patch) | |
tree | b30ca6e0b8d924ba02291935a1c1aa30c7c32d01 /etc/builtin.conf | |
parent | edc6075fa3c7cda678068c2068fc360f05412c9f (diff) | |
download | mpv-52536aaa7b2cd1b8fe6b0d197f13aeb907aa7bea.tar.bz2 mpv-52536aaa7b2cd1b8fe6b0d197f13aeb907aa7bea.tar.xz |
f_decoder_wapper: trust frame return over error code
lavc_process() calls the receive/send callbacks, which mirror
libavcodec's send/receive API. The receive API in particular can return
both a status code and a frame. Normally, libavcodec is pretty explicit
that it can't return both a frame and an error. But the receive callback
does more stuff in addition (vd_lavc does hardware decoding fallbacks
etc.). The previous commit shows an instance where this happened, and
where it leaked a frame in this case.
For robustness, check whether the frame is set first, i.e. trust it over
the status code. Before this, it checked for an EOF status first.
Hopefully is of no consequence otherwise. I made this change after
testing everything (can someone implement a test suite which tests this
exhaustively).
Diffstat (limited to 'etc/builtin.conf')
0 files changed, 0 insertions, 0 deletions