lavc/encode: improve the empty frame check

Test for buf[0] rather than data[0] (which is broken for some hwaccel
formats).
This commit is contained in:
Anton Khirnov 2021-12-13 11:23:52 +01:00
parent fe31708eaa
commit 67aceaf4ad
1 changed files with 1 additions and 1 deletions

View File

@ -366,7 +366,7 @@ int attribute_align_arg avcodec_send_frame(AVCodecContext *avctx, const AVFrame
if (avci->draining)
return AVERROR_EOF;
if (avci->buffer_frame->data[0])
if (avci->buffer_frame->buf[0])
return AVERROR(EAGAIN);
if (!frame) {