summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-11-14 22:04:35 -0300
committerJames Almer <jamrial@gmail.com>2018-11-14 22:04:35 -0300
commit56f50183f38087e53c07cb670e5793f200d84d18 (patch)
tree978ee511ca5c090af4079dd49527579b91f65c4e
parente716323fa8526c7243ce73edd077761dc40e5f86 (diff)
libdav1d: fix build after a recent API break
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/libdav1d.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index ad4611fb9c..3501c15e22 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -142,12 +142,18 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
}
av_fifo_generic_write(dav1d->cache, &pkt, sizeof(pkt), libdav1d_fifo_write);
- } else {
- data = NULL;
}
}
- res = dav1d_decode(dav1d->c, data, &p);
+ res = dav1d_send_data(dav1d->c, data);
+ if (res < 0) {
+ if (res == -EINVAL)
+ res = AVERROR_INVALIDDATA;
+ if (res != -EAGAIN)
+ return res;
+ }
+
+ res = dav1d_get_picture(dav1d->c, &p);
if (res < 0) {
if (res == -EINVAL)
res = AVERROR_INVALIDDATA;