Merge commit 'bcc94328980e6c56546792ab08b0756abdce310b'

* commit 'bcc94328980e6c56546792ab08b0756abdce310b':
  opt: check the return values of av_get_token for ENOMEM.
  doc: Fix best_nb_channells typo
  matroska: pass the lace size to the matroska_parse_rm_audio

Conflicts:
	libavformat/matroskadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-04-04 13:00:59 +02:00
3 changed files with 12 additions and 4 deletions

View File

@@ -1032,9 +1032,16 @@ static int parse_key_value_pair(void *ctx, const char **buf,
char *val;
int ret;
if (!key)
return AVERROR(ENOMEM);
if (*key && strspn(*buf, key_val_sep)) {
(*buf)++;
val = av_get_token(buf, pairs_sep);
if (!val) {
av_freep(&key);
return AVERROR(ENOMEM);
}
} else {
av_log(ctx, AV_LOG_ERROR, "Missing key or no key/value separator found after key '%s'\n", key);
av_free(key);