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.2
Richard Fuchs 3 years ago
parent 3a4a9a6d97
commit 6fcdeb1791

@ -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