On Fri, 21 Oct 2011 16:04:12 +0300, Raivo Hool <[email protected]> wrote: > --- > libavformat/mov.c | 19 +++++++++++++++++++ > 1 files changed, 19 insertions(+), 0 deletions(-) > > diff --git a/libavformat/mov.c b/libavformat/mov.c > index 6baddeb..b13484c 100644 > --- a/libavformat/mov.c > +++ b/libavformat/mov.c > @@ -35,6 +35,7 @@ > #include "riff.h" > #include "isom.h" > #include "libavcodec/get_bits.h" > +#include "id3v1.h" > > #if CONFIG_ZLIB > #include <zlib.h> > @@ -126,6 +127,22 @@ static int mov_metadata_stik(MOVContext *c, AVIOContext > *pb, > return 0; > } > > +static int mov_metadata_gnre(MOVContext *c, AVIOContext *pb, > + unsigned len, const char *key) > +{ > + short genre; > + char buf[20]; > + > + avio_r8(pb); // unknown > + > + genre = avio_r8(pb); > + if (genre < 1 || genre > ID3v1_GENRE_MAX) genre = 1;
I'm not sure making up the '1' value is a good idea -- we should export what's stored in the file if it's valid or nothing at all. I'd just print a warning for invalid genre number and return. The other three patches look fine to me. -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
