Browse Source

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
pull/1642/head
Richard Fuchs 3 years ago
parent
commit
833c30d69e
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      recording-daemon/output.c

+ 2
- 0
recording-daemon/output.c View File

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