summaryrefslogtreecommitdiff
path: root/libavcodec/qsv.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2017-02-14 20:51:06 +0100
committerAnton Khirnov <anton@khirnov.net>2017-02-25 09:57:44 +0100
commit984736dd9e5b50987a5910e22495304e4a6d975c (patch)
tree606d2dbd201aa2c91e9528515b49c429fa9dac36 /libavcodec/qsv.c
parent4cc0227040adb9efc63be6a5765e3214f5c6f662 (diff)
lavc: make sure not to return EAGAIN from codecs
This error is treated specially by the API. CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/qsv.c')
-rw-r--r--libavcodec/qsv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c
index ab48bb0dfb..735e1536f8 100644
--- a/libavcodec/qsv.c
+++ b/libavcodec/qsv.c
@@ -94,15 +94,17 @@ static const struct {
{ MFX_ERR_LOCK_MEMORY, AVERROR(EIO), "failed to lock the memory block" },
{ MFX_ERR_NOT_INITIALIZED, AVERROR_BUG, "not initialized" },
{ MFX_ERR_NOT_FOUND, AVERROR(ENOSYS), "specified object was not found" },
- { MFX_ERR_MORE_DATA, AVERROR(EAGAIN), "expect more data at input" },
- { MFX_ERR_MORE_SURFACE, AVERROR(EAGAIN), "expect more surface at output" },
+ /* the following 3 errors should always be handled explicitly, so those "mappings"
+ * are for completeness only */
+ { MFX_ERR_MORE_DATA, AVERROR_UNKNOWN, "expect more data at input" },
+ { MFX_ERR_MORE_SURFACE, AVERROR_UNKNOWN, "expect more surface at output" },
+ { MFX_ERR_MORE_BITSTREAM, AVERROR_UNKNOWN, "expect more bitstream at output" },
{ MFX_ERR_ABORTED, AVERROR_UNKNOWN, "operation aborted" },
{ MFX_ERR_DEVICE_LOST, AVERROR(EIO), "device lost" },
{ MFX_ERR_INCOMPATIBLE_VIDEO_PARAM, AVERROR(EINVAL), "incompatible video parameters" },
{ MFX_ERR_INVALID_VIDEO_PARAM, AVERROR(EINVAL), "invalid video parameters" },
{ MFX_ERR_UNDEFINED_BEHAVIOR, AVERROR_BUG, "undefined behavior" },
{ MFX_ERR_DEVICE_FAILED, AVERROR(EIO), "device failed" },
- { MFX_ERR_MORE_BITSTREAM, AVERROR(EAGAIN), "expect more bitstream at output" },
{ MFX_ERR_INCOMPATIBLE_AUDIO_PARAM, AVERROR(EINVAL), "incompatible audio parameters" },
{ MFX_ERR_INVALID_AUDIO_PARAM, AVERROR(EINVAL), "invalid audio parameters" },