| 1663 | } |
| 1664 | |
| 1665 | int dec_init(Decoder **pdec, Scheduler *sch, |
| 1666 | AVDictionary **dec_opts, const DecoderOpts *o, |
| 1667 | AVFrame *param_out) |
| 1668 | { |
| 1669 | DecoderPriv *dp; |
| 1670 | int ret; |
| 1671 | |
| 1672 | *pdec = NULL; |
| 1673 | |
| 1674 | ret = dec_alloc(&dp, sch, !!(o->flags & DECODER_FLAG_SEND_END_TS)); |
| 1675 | if (ret < 0) |
| 1676 | return ret; |
| 1677 | |
| 1678 | multiview_check_manual(dp, *dec_opts); |
| 1679 | |
| 1680 | ret = dec_open(dp, dec_opts, o, param_out); |
| 1681 | if (ret < 0) |
| 1682 | goto fail; |
| 1683 | |
| 1684 | *pdec = &dp->dec; |
| 1685 | |
| 1686 | return dp->sch_idx; |
| 1687 | fail: |
| 1688 | dec_free((Decoder**)&dp); |
| 1689 | return ret; |
| 1690 | } |
| 1691 | |
| 1692 | int dec_create(const OptionsContext *o, const char *arg, Scheduler *sch) |
| 1693 | { |
no test coverage detected