summaryrefslogtreecommitdiff
path: root/libavcodec/encode.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-12-13 11:23:52 +0100
committerAnton Khirnov <anton@khirnov.net>2021-12-17 10:24:28 +0100
commit67aceaf4ad641a4d34c3ec70b532efdc60483e3d (patch)
tree62ffdc0d231f85d57fa9e30bf5acbd0573b1d6bb /libavcodec/encode.c
parentfe31708eaa10af42507b8db773d5af5a56e1aff4 (diff)
lavc/encode: improve the empty frame check
Test for buf[0] rather than data[0] (which is broken for some hwaccel formats).
Diffstat (limited to 'libavcodec/encode.c')
-rw-r--r--libavcodec/encode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index dd25cf999b..5575cf23db 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -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) {