[FFmpeg-cvslog] r19706 - trunk/libavcodec/pgssubdec.c

Reimar Döffinger Reimar.Doeffinger
Fri Aug 28 14:13:28 CEST 2009


On Fri, Aug 28, 2009 at 01:51:44PM +0200, Aurelien Jacobs wrote:
> On Wed, Aug 26, 2009 at 03:27:58AM +0200, reimar wrote:
> > Modified: trunk/libavcodec/pgssubdec.c
> > ==============================================================================
> > --- trunk/libavcodec/pgssubdec.c	Wed Aug 26 01:28:33 2009	(r19705)
> > +++ trunk/libavcodec/pgssubdec.c	Wed Aug 26 03:27:58 2009	(r19706)
> > @@ -343,6 +343,7 @@ static int display_end_segment(AVCodecCo
> >       *      not been cleared by a subsequent empty display command.
> >       */
> >  
> > +    memset(sub, 0, sizeof(*sub));
> >      sub->start_display_time = 0;
> >      sub->end_display_time   = 20000;
> >      sub->format             = 0;
> 
> Then initialization of start_display_time and format to 0 becomes redundant...

In principle yes, for readability/clarity I disagree.
start_display_time as the opposite IMO should be initialized when
end_display_time is, and format actually should become an enum somewhen
and them should be explicitly initialized.
That's why I'd prefer to leave it like this for now.



More information about the ffmpeg-cvslog mailing list