diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2022-02-17 01:36:19 +0300 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2022-02-17 02:00:09 +0300 |
commit | cae2c4f0bdd5285a2ee13e385f4474729948da10 (patch) | |
tree | aa1f05154617889e236fd15015595761a8df8b00 /tools | |
parent | 94b1bf456e9062a2f966453b1daea3fd6a9e03cc (diff) |
tools/dav1d: fix infinite loop on corrupt bitstreams
Unref data after decoding failure to prevent re-entering the loop
with the same data.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dav1d.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/dav1d.c b/tools/dav1d.c index 4348c4f..67937b4 100644 --- a/tools/dav1d.c +++ b/tools/dav1d.c @@ -270,6 +270,7 @@ int main(const int argc, char *const *const argv) { memset(&p, 0, sizeof(p)); if ((res = dav1d_send_data(c, &data)) < 0) { if (res != DAV1D_ERR(EAGAIN)) { + dav1d_data_unref(&data); fprintf(stderr, "Error decoding frame: %s\n", strerror(DAV1D_ERR(res))); if (res != DAV1D_ERR(EINVAL)) break; |