On Mon, 19 Aug 2013, John Stebbins wrote:
QuickTime requires that the stsd.text box be completely filled in. --- libavformat/movenc.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)diff --git a/libavformat/movenc.c b/libavformat/movenc.c index e7b2feb..9a7a69d 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -2992,12 +2992,17 @@ static void mov_create_chapter_track(AVFormatContext *s, int tracknum) MOVTrack *track = &mov->tracks[tracknum]; AVPacket pkt = { .stream_index = tracknum, .flags = AV_PKT_FLAG_KEY }; int i, len; + // These properties are required to make QT recognize the chapter track + uint8_t chapter_properties[43] = { 0, 0, 0, 0, 0, 0, 0, 1, }; track->mode = mov->mode; track->tag = MKTAG('t','e','x','t'); track->timescale = MOV_TIMESCALE; track->enc = avcodec_alloc_context3(NULL); track->enc->codec_type = AVMEDIA_TYPE_SUBTITLE; + track->enc->extradata = av_malloc(sizeof(chapter_properties)); + track->enc->extradata_size = sizeof(chapter_properties);
As Luca said, please check the malloc - otherwise this looks acceptable. // Martin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
