lavf/mov: add AVCodecTag entry for GoPro metadata
This allows for validation of the track type Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
6e15495bcb
commit
c9a992d931
@ -374,6 +374,11 @@ const AVCodecTag ff_codec_movsubtitle_tags[] = {
|
|||||||
{ AV_CODEC_ID_NONE, 0 },
|
{ AV_CODEC_ID_NONE, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const AVCodecTag ff_codec_movdata_tags[] = {
|
||||||
|
{ AV_CODEC_ID_BIN_DATA, MKTAG('g', 'p', 'm', 'd') },
|
||||||
|
{ AV_CODEC_ID_NONE, 0 },
|
||||||
|
};
|
||||||
|
|
||||||
/* map numeric codes from mdhd atom to ISO 639 */
|
/* map numeric codes from mdhd atom to ISO 639 */
|
||||||
/* cf. QTFileFormat.pdf p253, qtff.pdf p205 */
|
/* cf. QTFileFormat.pdf p253, qtff.pdf p205 */
|
||||||
/* http://developer.apple.com/documentation/mac/Text/Text-368.html */
|
/* http://developer.apple.com/documentation/mac/Text/Text-368.html */
|
||||||
|
@ -41,6 +41,7 @@ extern const AVCodecTag ff_mp4_obj_type[];
|
|||||||
extern const AVCodecTag ff_codec_movvideo_tags[];
|
extern const AVCodecTag ff_codec_movvideo_tags[];
|
||||||
extern const AVCodecTag ff_codec_movaudio_tags[];
|
extern const AVCodecTag ff_codec_movaudio_tags[];
|
||||||
extern const AVCodecTag ff_codec_movsubtitle_tags[];
|
extern const AVCodecTag ff_codec_movsubtitle_tags[];
|
||||||
|
extern const AVCodecTag ff_codec_movdata_tags[];
|
||||||
|
|
||||||
int ff_mov_iso639_to_lang(const char lang[4], int mp4);
|
int ff_mov_iso639_to_lang(const char lang[4], int mp4);
|
||||||
int ff_mov_lang_to_iso639(unsigned code, char to[4]);
|
int ff_mov_lang_to_iso639(unsigned code, char to[4]);
|
||||||
|
@ -2034,6 +2034,8 @@ static int mov_codec_id(AVStream *st, uint32_t format)
|
|||||||
id = ff_codec_get_id(ff_codec_movsubtitle_tags, format);
|
id = ff_codec_get_id(ff_codec_movsubtitle_tags, format);
|
||||||
if (id > 0)
|
if (id > 0)
|
||||||
st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE;
|
st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE;
|
||||||
|
else
|
||||||
|
id = ff_codec_get_id(ff_codec_movdata_tags, format);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2507,6 +2509,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
|
|||||||
mov_parse_stsd_subtitle(c, pb, st, sc,
|
mov_parse_stsd_subtitle(c, pb, st, sc,
|
||||||
size - (avio_tell(pb) - start_pos));
|
size - (avio_tell(pb) - start_pos));
|
||||||
} else {
|
} else {
|
||||||
|
st->codecpar->codec_id = id;
|
||||||
ret = mov_parse_stsd_data(c, pb, st, sc,
|
ret = mov_parse_stsd_data(c, pb, st, sc,
|
||||||
size - (avio_tell(pb) - start_pos));
|
size - (avio_tell(pb) - start_pos));
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user