| 427 | } |
| 428 | |
| 429 | static int tee_process_slave_failure(AVFormatContext *avf, unsigned slave_idx, int err_n) |
| 430 | { |
| 431 | TeeContext *tee = avf->priv_data; |
| 432 | TeeSlave *tee_slave = &tee->slaves[slave_idx]; |
| 433 | |
| 434 | tee->nb_alive--; |
| 435 | |
| 436 | close_slave(tee_slave); |
| 437 | |
| 438 | if (!tee->nb_alive) { |
| 439 | av_log(avf, AV_LOG_ERROR, "All tee outputs failed.\n"); |
| 440 | return err_n; |
| 441 | } else if (tee_slave->on_fail == ON_SLAVE_FAILURE_ABORT) { |
| 442 | av_log(avf, AV_LOG_ERROR, "Slave muxer #%u failed, aborting.\n", slave_idx); |
| 443 | return err_n; |
| 444 | } else { |
| 445 | av_log(avf, AV_LOG_ERROR, "Slave muxer #%u failed: %s, continuing with %u/%u slaves.\n", |
| 446 | slave_idx, av_err2str(err_n), tee->nb_alive, tee->nb_slaves); |
| 447 | return 0; |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | static int tee_write_header(AVFormatContext *avf) |
| 452 | { |
no test coverage detected