Imported Debian version 2.5.0~trusty1.1
[deb_ffmpeg.git] / ffmpeg / libavcodec / bitstream_filter.c
index 751b90d1d526c7ce4edc4e79ecb0554023513db3..3275326db4f0f0b0092bd667f510108a76c87ee0 100644 (file)
@@ -43,9 +43,9 @@ void av_register_bitstream_filter(AVBitStreamFilter *bsf)
 
 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)) {
             AVBitStreamFilterContext *bsfc =
                 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;
             return bsfc;
         }
-        bsf = bsf->next;
     }
     return NULL;
 }