1
0
Fork 0

vorbiscomment: allow using vorbiscomment parser without input context

This commit is contained in:
Hendrik Leppkes 2013-08-13 13:47:34 +02:00
parent e5873d800b
commit 1d535fad4b
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
1 changed files with 2 additions and 2 deletions

View File

@ -125,14 +125,14 @@ static int vorbis_parse_single_comment(AVFormatContext *as, AVDictionary **m,
goto end;
}
ret = av_base64_decode(pict, v, len);
if (ret > 0)
if (as && ret > 0)
ret = ff_flac_parse_picture(as, &pict, ret, 0);
av_freep(&pict);
if (ret < 0) {
av_log(as, AV_LOG_WARNING, "Failed to parse cover art block.\n");
goto end;
}
} else if (!ogm_chapter(as, t, v)) {
} else if (!as || !ogm_chapter(as, t, v)) {
(*updates)++;
if (av_dict_get(*m, t, NULL, 0))
av_dict_set(m, t, ";", AV_DICT_APPEND);