Mercurial > libavformat.hg
changeset 4953:1b3487b81ac7 libavformat
fix hdlr descr in mp4 which use c string, patch by Larbi Joubala, larbi dot joubala at resonate-mp4 dot com
author | bcoudurier |
---|---|
date | Sat, 23 May 2009 07:17:17 +0000 |
parents | 0be83fd54e7a |
children | 2a4f618b2da3 |
files | movenc.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/movenc.c Sat May 23 06:25:44 2009 +0000 +++ b/movenc.c Sat May 23 07:17:17 2009 +0000 @@ -1013,8 +1013,11 @@ put_be32(pb ,0); /* reserved */ put_be32(pb ,0); /* reserved */ put_be32(pb ,0); /* reserved */ - put_byte(pb, strlen(descr)); /* string counter */ + if (!track || track->mode == MODE_MOV) + put_byte(pb, strlen(descr)); /* pascal string */ put_buffer(pb, descr, strlen(descr)); /* handler description */ + if (track && track->mode != MODE_MOV) + put_byte(pb, 0); /* c string */ return updateSize(pb, pos); }