lavf: allow BSFs to drop packets.

If pkt->size == 0 && pkt->side_data_elems == 0 after bsf->filter()
returns, the packet is considered dropped.
This commit is contained in:
Ronald S. Bultje 2016-02-29 09:42:54 -05:00
parent 867637caea
commit 6d8ab358a3
8 changed files with 31 additions and 15 deletions

View file

@ -2850,7 +2850,9 @@ int avformat_queue_attached_pictures(AVFormatContext *s);
* Apply a list of bitstream filters to a packet.
*
* @param codec AVCodecContext, usually from an AVStream
* @param pkt the packet to apply filters to
* @param pkt the packet to apply filters to. If, on success, the returned
* packet has size == 0 and side_data_elems == 0, it indicates that
* the packet should be dropped
* @param bsfc a NULL-terminated list of filters to apply
* @return >=0 on success;
* AVERROR code on failure