codec_dav1d: disambiguate "needs more data" and "no more frames" in feed data pump
diff --git a/CHANGELOG.md b/CHANGELOG.md index aaad970..d541ad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ - Fixed some warnings (removed unused variables and a bad cast) - Add a define in dav1d layer for supporting older dav1d codecs - Enabled tons of warnings, and warnings-as-errors; Fixed associated fallout +- codec_dav1d: disambiguate "needs more data" and "no more frames" in feed data pump ## [0.3.2] - 2019-07-23 ### Added
diff --git a/src/codec_dav1d.c b/src/codec_dav1d.c index a3ac0aa..eb45bef 100644 --- a/src/codec_dav1d.c +++ b/src/codec_dav1d.c
@@ -86,7 +86,10 @@ for (;;) { avifBool sentData = dav1dFeedData(codec); int res = dav1d_get_picture(codec->internal->dav1dContext, &nextFrame); - if ((res < 0) && (res != DAV1D_ERR(EAGAIN)) && !sentData) { + if ((res == DAV1D_ERR(EAGAIN)) && sentData) { + // send more data + continue; + } else if (res < 0) { // No more frames return AVIF_FALSE; } else {