MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / apv_receive_frame

Function apv_receive_frame

libavcodec/apv_decode.c:527–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525}
526
527static int apv_receive_frame(AVCodecContext *avctx, AVFrame *frame)
528{
529 APVDecodeContext *apv = avctx->priv_data;
530 int err;
531
532 do {
533 if (!apv->au.nb_units) {
534 err = ff_decode_get_packet(avctx, apv->pkt);
535 if (err < 0)
536 return err;
537
538 err = ff_cbs_read_packet(apv->cbc, &apv->au, apv->pkt);
539 if (err < 0) {
540 ff_cbs_fragment_reset(&apv->au);
541 av_packet_unref(apv->pkt);
542 av_log(avctx, AV_LOG_ERROR, "Failed to read packet.\n");
543 return err;
544 }
545
546 apv->nb_unit = 0;
547 av_log(avctx, AV_LOG_DEBUG, "Total PBUs on this packet: %d.\n",
548 apv->au.nb_units);
549 }
550
551 err = apv_receive_frame_internal(avctx, frame);
552 } while (err == AVERROR(EAGAIN));
553
554 return err;
555}
556
557const FFCodec ff_apv_decoder = {
558 .p.name = "apv",

Callers

nothing calls this directly

Calls 4

ff_decode_get_packetFunction · 0.85
av_packet_unrefFunction · 0.85
av_logFunction · 0.85

Tested by

no test coverage detected