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

@@ -694,6 +694,8 @@ static void write_frame(AVFormatContext *s, AVPacket *pkt, OutputStream *ost)
if (exit_on_error)
exit_program(1);
}
if (pkt->size == 0 && pkt->side_data_elems == 0)
return;
if (!(s->oformat->flags & AVFMT_NOTIMESTAMPS)) {
if (pkt->dts != AV_NOPTS_VALUE &&