hwaccel: Deinitialize hardware acceleration early enough

The application will destroy the underlying hardware handles when
get_format() gets called again. Also this ensures the
deinitialization takes place if the get_format callback returns an
error.

Regression from 1c80c9d7ef809180042257200c7b5f6b81d0b0e2.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Merge commit '4ff670d99bebd97429322719089363d83143477d'

* commit '4ff670d99bebd97429322719089363d83143477d':
  hwaccel: Deinitialize hardware acceleration early enough

Merged-by: Michael Niedermayer <michaelni@gmx.at>
doc: clarify -frames options behavior

Replace "frames to record" with "frames to output". The "to record"
makes it seem like an input option, or that it would capture the frames
instead of outputting them.

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>