MT#55283 add extra output-open test

The `encoder` is actually persistent and only freed when the output is
freed, so testing for its existence is not enough to determine whether
the output is open. The `fmtctx` can be used for that.

Change-Id: I2cc3f00a0e983fafd5915736089a0421385b6ce3
(cherry picked from commit 833c30d69e)
pull/1736/head
Richard Fuchs 2 years ago
parent ac47ea24bb
commit ecc9cb321e

@ -43,6 +43,8 @@ int output_add(output_t *output, AVFrame *frame) {
return -1;
if (!output->encoder) // not ready - not configured
return -1;
if (!output->fmtctx) // output not open
return -1;
return encoder_input_fifo(output->encoder, frame, output_got_packet, output, NULL);
}

Loading…
Cancel
Save