ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Mon Sep 6 19:39:19 2021 +0200| [b99fb4df42871e16077c3248ab9cfd8cfd034a85] | committer: Andreas Rheinhardt
avcodec/bsf: Use null-bsf for passthrough when available When an empty list bsf is used for passthrough, there is a check for every packet in bsf_list_filter() before ff_bsf_get_packet_ref() is called. Directly using the null bsf avoids that. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b99fb4df42871e16077c3248ab9cfd8cfd034a85 --- libavcodec/bsf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index d9c8395260..62fe7ae5e8 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c @@ -18,6 +18,8 @@ #include <string.h> +#include "config.h" + #include "libavutil/avassert.h" #include "libavutil/log.h" #include "libavutil/mem.h" @@ -544,5 +546,10 @@ end: int av_bsf_get_null_filter(AVBSFContext **bsf) { +#if CONFIG_NULL_BSF + extern const AVBitStreamFilter ff_null_bsf; + return av_bsf_alloc(&ff_null_bsf, bsf); +#else return av_bsf_alloc(&list_bsf, bsf); +#endif } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".