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
c6fa5a8d04
commit
15a0ff81c5
|
@ -226,8 +226,10 @@ 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);
|
||||
|
|
Loading…
Reference in New Issue