| 230 | } |
| 231 | |
| 232 | static int seqvideo_decode_frame(AVCodecContext *avctx, AVFrame *rframe, |
| 233 | int *got_frame, AVPacket *avpkt) |
| 234 | { |
| 235 | const uint8_t *buf = avpkt->data; |
| 236 | int buf_size = avpkt->size; |
| 237 | int ret; |
| 238 | |
| 239 | SeqVideoContext *seq = avctx->priv_data; |
| 240 | |
| 241 | if ((ret = ff_reget_buffer(avctx, seq->frame, 0)) < 0) |
| 242 | return ret; |
| 243 | |
| 244 | if (seqvideo_decode(seq, buf, buf_size)) |
| 245 | return AVERROR_INVALIDDATA; |
| 246 | |
| 247 | if ((ret = av_frame_ref(rframe, seq->frame)) < 0) |
| 248 | return ret; |
| 249 | *got_frame = 1; |
| 250 | |
| 251 | return buf_size; |
| 252 | } |
| 253 | |
| 254 | static av_cold int seqvideo_decode_end(AVCodecContext *avctx) |
| 255 | { |
nothing calls this directly
no test coverage detected