mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
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.rheinhardt@outlook.com>
This commit is contained in:
parent
b2793a9462
commit
b99fb4df42
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user