[FFmpeg-devel] [PATCH] movdec: handle 0x7fff langcode as macintosh per the specs
Michael Niedermayer
michaelni at gmx.at
Fri Apr 6 05:24:20 CEST 2012
On Wed, Mar 21, 2012 at 10:58:15PM +0100, Reimar Döffinger wrote:
> On Wed, Mar 21, 2012 at 02:18:16PM -0700, Baptiste Coudurier wrote:
> > ---
> > libavformat/isom.c | 2 +-
> > libavformat/mov.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavformat/isom.c b/libavformat/isom.c
> > index f12ba2c..f45a727 100644
> > --- a/libavformat/isom.c
> > +++ b/libavformat/isom.c
> > @@ -347,7 +347,7 @@ int ff_mov_lang_to_iso639(unsigned code, char to[4])
> > memset(to, 0, 4);
> > /* is it the mangled iso code? */
> > /* see http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt */
> > - if (code > 138) {
> > + if (code >= 0x400 && code != 0x7fff) {
> > for (i = 2; i >= 0; i--) {
> > to[i] = 0x60 + (code & 0x1f);
> > code >>= 5;
> > diff --git a/libavformat/mov.c b/libavformat/mov.c
> > index de290aa..88f6728 100644
> > --- a/libavformat/mov.c
> > +++ b/libavformat/mov.c
> > @@ -253,7 +253,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
> > if (parse)
> > parse(c, pb, str_size, key);
> > else {
> > - if (data_type == 3 || (data_type == 0 && langcode < 0x800)) { // MAC Encoded
> > + if (data_type == 3 || (data_type == 0 && (langcode < 0x400 || langcode == 0x7fff)) { // MAC Encoded
>
> You replace/change a few more values than just the 0x7fff, would be nice if the
> commit message would mention/explain that.
fixed and applied
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120406/425b99bf/attachment.asc>
More information about the ffmpeg-devel
mailing list