diff options
author | James Almer <jamrial@gmail.com> | 2018-11-14 16:05:25 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-11-14 16:05:25 +0300 |
commit | 752659327d4ac73640781376d214a26765f971f4 (patch) | |
tree | 8597b5db7d795b7defdf9ddf02928970b0ddb911 /libavcodec/libdav1d.c | |
parent | 759589b55ee529f6e9b1355a99235777a4da7fdc (diff) |
avcodec/libdav1d: fix build after a recent API break
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/libdav1d.c')
-rw-r--r-- | libavcodec/libdav1d.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 873adfda40..b19aee4e9e 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@ -140,12 +140,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; |