Skip to content

Commit

Permalink
Don't flush twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Nov 1, 2024
1 parent ac7d1bb commit 1b72beb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions avcodec/avcodec_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,9 @@ static void send_frame(codec_context_t *ctx, AVFrame *frame) {
int ret;
AVFrame *hw_frame = NULL;

if (ctx->flushed)
ocaml_avutil_raise_error(AVERROR_EOF);

ctx->flushed = !frame;

if (ctx->codec_context->hw_frames_ctx && frame) {
Expand Down

0 comments on commit 1b72beb

Please sign in to comment.