[FFmpeg-devel] [PATCH]Recognize "qt " compatible brand in isom
Carl Eugen Hoyos
cehoyos at ag.or.at
Sat Nov 3 01:12:44 CET 2012
On Friday 02 November 2012 08:08:44 pm Michael Niedermayer wrote:
> > > +++ b/libavformat/mov.c
> > > @@ -1397,7 +1397,8 @@ int ff_mov_read_stsd_entries(MOVContext *c,
> > > AVIOContext *pb, int entries)
> > >
> > > //Read QT version 1 fields. In version 0 these do not
> > > exist. av_dlog(c->fc, "version =%d, isom =%d\n",version,c->isom); -
> > > if (!c->isom) {
> > > + if (!c->isom ||
> > > + strstr(av_dict_get(c->fc->metadata,
> > > "compatible_brands", NULL, AV_DICT_MATCH_CASE)->value, "qt ")) { if
> > > (version==1) {
> > > sc->samples_per_frame = avio_rb32(pb);
> > > avio_rb32(pb); /* bytes per packet */
> >
> > Might be ok.
>
> Is this special case specific to this use of isom or could isom
> itself be changed based on the existence of qt in compatible_brands
> ?
Alternative patch attached.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavformat/mov.c b/libavformat/mov.c
index d7d7f21..ad9bcd1 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -755,6 +755,8 @@ static int mov_read_ftyp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_read(pb, comp_brands_str, comp_brand_size);
comp_brands_str[comp_brand_size] = 0;
av_dict_set(&c->fc->metadata, "compatible_brands", comp_brands_str, 0);
+ if (strstr(comp_brands_str, "qt "))
+ c->isom = 0;
av_freep(&comp_brands_str);
return 0;
More information about the ffmpeg-devel
mailing list