| 708 | } |
| 709 | |
| 710 | int attribute_align_arg avcodec_receive_frame_flags(AVCodecContext *avctx, |
| 711 | AVFrame *frame, unsigned flags) |
| 712 | { |
| 713 | av_frame_unref(frame); |
| 714 | |
| 715 | if (!avcodec_is_open(avctx) || !avctx->codec) |
| 716 | return AVERROR(EINVAL); |
| 717 | |
| 718 | if (ff_codec_is_decoder(avctx->codec)) |
| 719 | return ff_decode_receive_frame(avctx, frame, flags); |
| 720 | return ff_encode_receive_frame(avctx, frame); |
| 721 | } |
| 722 | |
| 723 | int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame) |
| 724 | { |
no test coverage detected