Function av_bsf_receive_packet
pub unsafe extern "C" fn av_bsf_receive_packet(
ctx: *mut AVBSFContext,
pkt: *mut AVPacket,
) -> i32
Expand description
Retrieve a filtered packet.
@param ctx an initialized AVBSFContext @param[out] pkt this struct will be filled with the contents of the filtered packet. It is owned by the caller and must be freed using av_packet_unref() when it is no longer needed. This parameter should be “clean” (i.e. freshly allocated with av_packet_alloc() or unreffed with av_packet_unref()) when this function is called. If this function returns successfully, the contents of pkt will be completely overwritten by the returned data. On failure, pkt is not touched.
@return
- 0 on success.
- AVERROR(EAGAIN) if more packets need to be sent to the filter (using av_bsf_send_packet()) to get more output.
- AVERROR_EOF if there will be no further output from the filter.
- Another negative AVERROR value if an error occurs.
@note one input packet may result in several output packets, so after sending a packet with av_bsf_send_packet(), this function needs to be called repeatedly until it stops returning 0. It is also possible for a filter to output fewer packets than were sent to it, so this function may return AVERROR(EAGAIN) immediately after a successful av_bsf_send_packet() call.