Browse Source

avcodec/libdav1d: consistently use AVERROR return values

Signed-off-by: James Almer <jamrial@gmail.com>
tags/n4.2
James Almer 7 years ago
parent
commit
36bb2cc200
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      libavcodec/libdav1d.c

+ 4
- 4
libavcodec/libdav1d.c View File

@@ -185,9 +185,9 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)

res = dav1d_send_data(dav1d->c, data);
if (res < 0) {
if (res == -EINVAL)
if (res == AVERROR(EINVAL))
res = AVERROR_INVALIDDATA;
if (res != -EAGAIN)
if (res != AVERROR(EAGAIN))
return res;
}

@@ -197,9 +197,9 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)

res = dav1d_get_picture(dav1d->c, p);
if (res < 0) {
if (res == -EINVAL)
if (res == AVERROR(EINVAL))
res = AVERROR_INVALIDDATA;
else if (res == -EAGAIN && c->internal->draining)
else if (res == AVERROR(EAGAIN) && c->internal->draining)
res = AVERROR_EOF;

av_free(p);


Loading…
Cancel
Save