summaryrefslogtreecommitdiff
path: root/libavformat/mux.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2020-04-18 10:49:54 +0200
committerMarton Balint <cus@passwd.hu>2020-04-26 22:39:01 +0200
commit1128aa875367f66ac11adc30364d5652919a2591 (patch)
tree72a92801d4bff46f69093b364cc3bf2016d87ff7 /libavformat/mux.c
parent499f43ae90c0b03264e874c199a5904280766782 (diff)
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>
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r--libavformat/mux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index c348b8fdc8..3d1f71ab1a 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -811,7 +811,7 @@ static int prepare_input_packet(AVFormatContext *s, AVPacket *pkt)
static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) {
AVStream *st = s->streams[pkt->stream_index];
- int i, ret;
+ int ret;
if (!(s->flags & AVFMT_FLAG_AUTO_BSF))
return 1;
@@ -825,8 +825,8 @@ static int do_packet_auto_bsf(AVFormatContext *s, AVPacket *pkt) {
}
}
- for (i = 0; i < st->internal->nb_bsfcs; i++) {
- AVBSFContext *ctx = st->internal->bsfcs[i];
+ if (st->internal->bsfc) {
+ AVBSFContext *ctx = st->internal->bsfc;
// TODO: when any bitstream filter requires flushing at EOF, we'll need to
// flush each stream's BSF chain on write_trailer.
if ((ret = av_bsf_send_packet(ctx, pkt)) < 0) {