[FFmpeg-cvslog] r19979 - trunk/libavcodec/h264.c

Michael Niedermayer michaelni
Wed Sep 23 13:07:14 CEST 2009


On Wed, Sep 23, 2009 at 12:36:11PM +0200, Reimar D?ffinger wrote:
> On Wed, Sep 23, 2009 at 11:58:45AM +0200, michael wrote:
> > Author: michael
> > Date: Wed Sep 23 11:58:44 2009
> > New Revision: 19979
> > 
> > Log:
> > Check num_units_in_tick/time_scale to be valid and within the range we support.
> > based on a patch by chrome
> > 
> > Modified:
> >    trunk/libavcodec/h264.c
> > 
> > Modified: trunk/libavcodec/h264.c
> > ==============================================================================
> > --- trunk/libavcodec/h264.c	Wed Sep 23 11:18:23 2009	(r19978)
> > +++ trunk/libavcodec/h264.c	Wed Sep 23 11:58:44 2009	(r19979)
> > @@ -7087,6 +7087,10 @@ static inline int decode_vui_parameters(
> >      if(sps->timing_info_present_flag){
> >          sps->num_units_in_tick = get_bits_long(&s->gb, 32);
> >          sps->time_scale = get_bits_long(&s->gb, 32);
> > +        if(sps->num_units_in_tick-1 > 0x7FFFFFFEU || sps->time_scale-1 > 0x7FFFFFFEU){
> > +            av_log(h->s.avctx, AV_LOG_ERROR, "time_scale/num_units_in_tick inavlid or unsupported (%d/%d)\n", sps->time_scale, sps->num_units_in_tick);
> > +            return -1;
> > +        }
> >          sps->fixed_frame_rate_flag = get_bits1(&s->gb);
> >      }
> 
> No sense to make it fallback to some sane value instead of failing in
> your opinion?
> Or just not until it happens with some real-world file?

until it happens with a file i really dont know what is the correct
thing to do ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20090923/79246a2a/attachment.pgp>



More information about the ffmpeg-cvslog mailing list