avformat/pcmdec: Fix NULL + 1

It is undefined behaviour.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/371/head
Andreas Rheinhardt 4 years ago
parent 301ae25e99
commit b9b0c96db7
  1. 3
      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)

Loading…
Cancel
Save