Commit 36bb2cc2 authored by James Almer's avatar James Almer

avcodec/libdav1d: consistently use AVERROR return values

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 28746a0e
...@@ -185,9 +185,9 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) ...@@ -185,9 +185,9 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
res = dav1d_send_data(dav1d->c, data); res = dav1d_send_data(dav1d->c, data);
if (res < 0) { if (res < 0) {
if (res == -EINVAL) if (res == AVERROR(EINVAL))
res = AVERROR_INVALIDDATA; res = AVERROR_INVALIDDATA;
if (res != -EAGAIN) if (res != AVERROR(EAGAIN))
return res; return res;
} }
...@@ -197,9 +197,9 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) ...@@ -197,9 +197,9 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
res = dav1d_get_picture(dav1d->c, p); res = dav1d_get_picture(dav1d->c, p);
if (res < 0) { if (res < 0) {
if (res == -EINVAL) if (res == AVERROR(EINVAL))
res = AVERROR_INVALIDDATA; res = AVERROR_INVALIDDATA;
else if (res == -EAGAIN && c->internal->draining) else if (res == AVERROR(EAGAIN) && c->internal->draining)
res = AVERROR_EOF; res = AVERROR_EOF;
av_free(p); av_free(p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment