avcodec/bitstream_filter: Use av_bitstream_filter_next() instead of direct access...
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 30 Sep 2014 16:00:00 +0000 (18:00 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 30 Sep 2014 18:27:07 +0000 (20:27 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/bitstream_filter.c

index 751b90d..3275326 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;
 }