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

Function av_packet_make_refcounted

libavcodec/packet.c:495–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495int av_packet_make_refcounted(AVPacket *pkt)
496{
497 int ret;
498
499 if (pkt->buf)
500 return 0;
501
502 ret = packet_alloc(&pkt->buf, pkt->size);
503 if (ret < 0)
504 return ret;
505 av_assert1(!pkt->size || pkt->data);
506 if (pkt->size)
507 memcpy(pkt->buf->data, pkt->data, pkt->size);
508
509 pkt->data = pkt->buf->data;
510
511 return 0;
512}
513
514int av_packet_make_writable(AVPacket *pkt)
515{

Callers 10

LLVMFuzzerTestOneInputFunction · 0.85
ff_read_packetFunction · 0.85
parse_packetFunction · 0.85
prepare_input_packetFunction · 0.85
ff_interleave_add_packetFunction · 0.85
avpriv_packet_list_putFunction · 0.85
av_bsf_send_packetFunction · 0.85
ffmmal_add_packetFunction · 0.85

Calls 1

packet_allocFunction · 0.85

Tested by

no test coverage detected