summaryrefslogtreecommitdiffstats
path: root/DOCS/man/options.rst
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-25 21:50:10 +0200
committerwm4 <wm4@nowhere>2019-10-25 21:50:10 +0200
commit52536aaa7b2cd1b8fe6b0d197f13aeb907aa7bea (patch)
treeb30ca6e0b8d924ba02291935a1c1aa30c7c32d01 /DOCS/man/options.rst
parentedc6075fa3c7cda678068c2068fc360f05412c9f (diff)
downloadmpv-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 'DOCS/man/options.rst')
0 files changed, 0 insertions, 0 deletions