summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorRĂ©mi Denis-Courmont <remi@remlab.net>2014-09-16 22:17:47 +0300
committerLuca Barbato <lu_zero@gentoo.org>2014-09-26 21:28:36 +0200
commit1c80c9d7ef809180042257200c7b5f6b81d0b0e2 (patch)
treec642d47006c38dea27b5c1b3a3a87bf09efd3028 /libavcodec/avcodec.h
parent9d2cee52d37c7340f85a5d41110282aac03e6855 (diff)
hwaccel: Call ->get_format again if hwaccel init fails
This allows the application to fall back on another hwaccel or, more likely, software decoding. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index bc5f1346f2..dfbab9b60f 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1294,6 +1294,10 @@ typedef struct AVCodecContext {
* @param fmt is the list of formats which are supported by the codec,
* it is terminated by -1 as 0 is a valid format, the formats are ordered by quality.
* The first is always the native one.
+ * @note The callback may be called again immediately if initialization for
+ * the selected (hardware-accelerated) pixel format failed.
+ * @warning Behavior is undefined if the callback returns a value not
+ * in the fmt list of formats.
* @return the chosen format
* - encoding: unused
* - decoding: Set by user, if not set the native format will be chosen.