diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-12-13 11:23:52 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-12-17 10:24:28 +0100 |
commit | 67aceaf4ad641a4d34c3ec70b532efdc60483e3d (patch) | |
tree | 62ffdc0d231f85d57fa9e30bf5acbd0573b1d6bb /libavcodec/encode.c | |
parent | fe31708eaa10af42507b8db773d5af5a56e1aff4 (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.c | 2 |
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) { |