Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2013-08-13 15:47:34 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2013-09-02 18:05:39 +0400
commite7b1c8d008c3cde5e2cfe901c40166ebdd01e487 (patch)
tree5cc8168788e537f08d165ab645152e41dbad5e0f
parent73c81228e7a8a8d57001a031e0ad087b8ca7cb27 (diff)
vorbiscomment: allow using vorbiscomment parser without input context
-rw-r--r--libavformat/oggparsevorbis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 7d525f43dc..31f47097b8 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -140,7 +140,7 @@ ff_vorbis_comment(AVFormatContext * as, AVDictionary **m, const uint8_t *buf, in
av_freep(&ct);
continue;
}
- if ((ret = av_base64_decode(pict, ct, vl)) > 0)
+ if (as && (ret = av_base64_decode(pict, ct, vl)) > 0)
ret = ff_flac_parse_picture(as, pict, ret);
av_freep(&pict);
av_freep(&tt);
@@ -149,7 +149,7 @@ ff_vorbis_comment(AVFormatContext * as, AVDictionary **m, const uint8_t *buf, in
av_log(as, AV_LOG_WARNING, "Failed to parse cover art block.\n");
continue;
}
- } else if (!ogm_chapter(as, tt, ct))
+ } else if (!as || !ogm_chapter(as, tt, ct))
av_dict_set(m, tt, ct,
AV_DICT_DONT_STRDUP_KEY |
AV_DICT_DONT_STRDUP_VAL);