[FFmpeg-devel] [PATCH 1/2] srtdec: Add timing-less "subrip" decoder.

Philip Langdale philipl at overt.org
Sun Aug 12 23:25:39 CEST 2012


On Sun, 12 Aug 2012 11:11:31 +0200
Clément Bœsch <ubitux at gmail.com> wrote:

> > +    AV_CODEC_ID_SUBRIP,
> 
> Please choose MKBETAG('S','R','i','p') or something.

Done.
 
> > +            ts_start = av_rescale_q(avpkt->pts,
> > +                                    avctx->time_base,
> > +                                    (AVRational){1,1000}) / 10;
> > +            ts_end   = av_rescale_q(avpkt->pts + avpkt->duration,
> > +                                    avctx->time_base,
> > +                                    (AVRational){1,1000}) / 10;
> 
> Why not rescale to {1,100} and avoid /10?

In my original testing, I was finding that the rounding was worse
in the {1,100} case, but in new testing I see it's pretty much the
same and sometimes better, so I'm just going to put 1,100.

Thanks,

--phil


More information about the ffmpeg-devel mailing list