Commit 9f97f7c5 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '93c04e09'

* commit '93c04e09':
  Expose metadata found in onCuePoint events in .flv files.
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents f01a1281 93c04e09
......@@ -458,8 +458,9 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream,
return -1;
}
// only look for metadata values when we are not nested and key != NULL
if (depth == 1 && key) {
if (key) {
// stream info doesn't live any deeper than the first object
if (depth == 1) {
acodec = astream ? astream->codec : NULL;
vcodec = vstream ? vstream->codec : NULL;
......@@ -500,6 +501,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream,
}
}
}
}
if (amf_type == AMF_DATA_TYPE_OBJECT && s->nb_streams == 1 &&
((!acodec && !strcmp(key, "audiocodecid")) ||
......@@ -560,7 +562,7 @@ static int flv_read_metabody(AVFormatContext *s, int64_t next_pos)
if (!strcmp(buffer, "onTextData"))
return 1;
if (strcmp(buffer, "onMetaData"))
if (strcmp(buffer, "onMetaData") && strcmp(buffer, "onCuePoint"))
return -1;
// find the streams now so that amf_parse_object doesn't need to do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment