Merge commit '93c04e095dc37ebdab22174e88cfa91e24940866'

* commit '93c04e095dc37ebdab22174e88cfa91e24940866':
  Expose metadata found in onCuePoint events in .flv files.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-08-13 23:14:17 +02:00
commit 9f97f7c546

View File

@ -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