Skip to content

Commit 1b72beb

Browse files
committed
Don't flush twice.
1 parent ac7d1bb commit 1b72beb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

avcodec/avcodec_stubs.c

+3
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,9 @@ static void send_frame(codec_context_t *ctx, AVFrame *frame) {
926926
int ret;
927927
AVFrame *hw_frame = NULL;
928928

929+
if (ctx->flushed)
930+
ocaml_avutil_raise_error(AVERROR_EOF);
931+
929932
ctx->flushed = !frame;
930933

931934
if (ctx->codec_context->hw_frames_ctx && frame) {

0 commit comments

Comments
 (0)