mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/libdav1d: free the Dav1dData packet on dav1d_send_data() failure
We still own it on failure, and there's no point trying to feed it again. This should address the issue reported in dav1d #383 and part of VLC #26259. Signed-off-by: James Almer <jamrial@gmail.com> Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
parent
d8d9d506a3
commit
61b104caaa
|
@ -347,9 +347,11 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
|
|||
if (res < 0) {
|
||||
if (res == AVERROR(EINVAL))
|
||||
res = AVERROR_INVALIDDATA;
|
||||
if (res != AVERROR(EAGAIN))
|
||||
if (res != AVERROR(EAGAIN)) {
|
||||
dav1d_data_unref(data);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
res = dav1d_get_picture(dav1d->c, p);
|
||||
if (res < 0) {
|
||||
|
|
Loading…
Reference in New Issue