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

Function av_bsf_send_packet

libavcodec/bsf.c:202–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
203{
204 FFBSFContext *const bsfi = ffbsfcontext(ctx);
205 int ret;
206
207 if (!pkt || AVPACKET_IS_EMPTY(pkt)) {
208 if (pkt)
209 av_packet_unref(pkt);
210 bsfi->eof = 1;
211 return 0;
212 }
213
214 if (bsfi->eof) {
215 av_log(ctx, AV_LOG_ERROR, "A non-NULL packet sent after an EOF.\n");
216 return AVERROR(EINVAL);
217 }
218
219 if (!AVPACKET_IS_EMPTY(bsfi->buffer_pkt))
220 return AVERROR(EAGAIN);
221
222 ret = av_packet_make_refcounted(pkt);
223 if (ret < 0)
224 return ret;
225 av_packet_move_ref(bsfi->buffer_pkt, pkt);
226
227 return 0;
228}
229
230int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt)
231{

Callers 15

LLVMFuzzerTestOneInputFunction · 0.85
extract_extradataFunction · 0.85
tee_write_packetFunction · 0.85
annexb_read_packetFunction · 0.85
obu_read_packetFunction · 0.85
evc_read_packetFunction · 0.85
write_packets_from_bsfsFunction · 0.85
filter_packetFunction · 0.85
mux_packet_filterFunction · 0.85
demux_sendFunction · 0.85
bsf_list_filterFunction · 0.85
qsv_enc_frameFunction · 0.85

Calls 5

ffbsfcontextFunction · 0.85
av_packet_unrefFunction · 0.85
av_logFunction · 0.85
av_packet_move_refFunction · 0.85

Tested by

no test coverage detected