Message ID | 20210224115341.794293-6-andreas.rheinhardt@gmail.com |
---|---|
State | Accepted |
Commit | b9b0c96db7aa272163c1e819553a3a508f029649 |
Headers | show |
Series | [FFmpeg-devel,01/15] avformat/movenc: Remove always true check | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c index e65b535665..395d9ecf92 100644 --- a/libavformat/pcmdec.c +++ b/libavformat/pcmdec.c @@ -57,8 +57,9 @@ static int pcm_read_header(AVFormatContext *s) len = strlen(mime_type); while (options < mime_type + len) { options = strstr(options, ";"); - if (!options++) + if (!options) break; + options++; if (!rate) sscanf(options, " rate=%d", &rate); if (!channels)
It is undefined behaviour. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> --- libavformat/pcmdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)