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)
mr11.3
Richard Fuchs 3 years ago
parent b0a994c5ac
commit 25904455bb

@ -45,6 +45,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