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

Function avcodec_receive_packet

libavcodec/encode.c:524–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522}
523
524int attribute_align_arg avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt)
525{
526 AVCodecInternal *avci = avctx->internal;
527 int ret;
528
529 av_packet_unref(avpkt);
530
531 if (!avcodec_is_open(avctx) || !av_codec_is_encoder(avctx->codec))
532 return AVERROR(EINVAL);
533
534 if (avci->buffer_pkt->data || avci->buffer_pkt->side_data) {
535 av_packet_move_ref(avpkt, avci->buffer_pkt);
536 } else {
537 ret = encode_receive_packet_internal(avctx, avpkt);
538 if (ret < 0)
539 return ret;
540 }
541
542 return 0;
543}
544
545static int encode_preinit_video(AVCodecContext *avctx)
546{

Callers 15

process_frameFunction · 0.85
encodeFunction · 0.85
encode_frameFunction · 0.85
encode_frameFunction · 0.85
filter_frameFunction · 0.85
filter_1phaseFunction · 0.85
run_testFunction · 0.85
encode_writeFunction · 0.85
encode_writeFunction · 0.85
encodeFunction · 0.85
write_frameFunction · 0.85
encode_writeFunction · 0.85

Calls 5

av_packet_unrefFunction · 0.85
avcodec_is_openFunction · 0.85
av_codec_is_encoderFunction · 0.85
av_packet_move_refFunction · 0.85

Tested by 2

process_frameFunction · 0.68
run_testFunction · 0.68