[FFmpeg-devel] [PATCH] avcodec/decode: fix bsfs string parsing when more than one filter is requested
James Almer
jamrial at gmail.com
Wed Jul 18 21:48:22 EEST 2018
av_get_token() leaves bsfs_str pointing to the delimiter character, so any
iteration past the first would be off by one character and start parsing
from the delimiter in question.
No test case as no decoder currently requests more than one bsfs.
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/decode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 6a3a4df179..8e9a40b7c0 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -244,6 +244,9 @@ static int bsfs_init(AVCodecContext *avctx)
ret = av_bsf_init(s->bsfs[s->nb_bsfs - 1]);
if (ret < 0)
goto fail;
+
+ if (*bsfs_str)
+ bsfs_str++;
}
return 0;
--
2.18.0
More information about the ffmpeg-devel
mailing list