avformat: only allow a single bitstream filter when muxing

Current muxers only use a single bitstream filter, so there is no need to
maintain code which operates on a list of bitstream filters. When multiple
bitstream filters are needed muxers can simply use a list bitstream filter.

If there is a use case in the future when different bitstream filters should be
added at subsequent packets then a new API possibly involving reconfiguring the
list bitstream filter can be added knowing the exact requirements.

Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint
2020-04-18 10:49:54 +02:00
parent 499f43ae90
commit 1128aa8753
5 changed files with 15 additions and 32 deletions

View File

@@ -1034,10 +1034,8 @@ static int seg_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)
if (ret == 1) {
AVStream *st = s->streams[pkt->stream_index];
AVStream *ost = oc->streams[pkt->stream_index];
st->internal->bsfcs = ost->internal->bsfcs;
st->internal->nb_bsfcs = ost->internal->nb_bsfcs;
ost->internal->bsfcs = NULL;
ost->internal->nb_bsfcs = 0;
st->internal->bsfc = ost->internal->bsfc;
ost->internal->bsfc = NULL;
}
return ret;
}