mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-18 21:10:10 +01:00
avcodec/bitstream_filter: Use av_bitstream_filter_next() instead of direct access in av_bitstream_filter_init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -43,9 +43,9 @@ void av_register_bitstream_filter(AVBitStreamFilter *bsf)
|
|||||||
|
|
||||||
AVBitStreamFilterContext *av_bitstream_filter_init(const char *name)
|
AVBitStreamFilterContext *av_bitstream_filter_init(const char *name)
|
||||||
{
|
{
|
||||||
AVBitStreamFilter *bsf = first_bitstream_filter;
|
AVBitStreamFilter *bsf = NULL;
|
||||||
|
|
||||||
while (bsf) {
|
while (bsf = av_bitstream_filter_next(bsf)) {
|
||||||
if (!strcmp(name, bsf->name)) {
|
if (!strcmp(name, bsf->name)) {
|
||||||
AVBitStreamFilterContext *bsfc =
|
AVBitStreamFilterContext *bsfc =
|
||||||
av_mallocz(sizeof(AVBitStreamFilterContext));
|
av_mallocz(sizeof(AVBitStreamFilterContext));
|
||||||
@@ -54,7 +54,6 @@ AVBitStreamFilterContext *av_bitstream_filter_init(const char *name)
|
|||||||
bsf->priv_data_size ? av_mallocz(bsf->priv_data_size) : NULL;
|
bsf->priv_data_size ? av_mallocz(bsf->priv_data_size) : NULL;
|
||||||
return bsfc;
|
return bsfc;
|
||||||
}
|
}
|
||||||
bsf = bsf->next;
|
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user