[FFmpeg-devel] [PATCH] Small improvement of MPEG-PES get_pts

Ivo ivop
Thu Jan 3 11:03:35 CET 2008


On Thursday 03 January 2008 02:57, M?ns Rullg?rd wrote:
> Ivo <ivop at euronet.nl> writes:
> > Hi,
> >
> > See subject. The new code uses one shift less.
> >
> > --Ivo
> >
> > Index: libavformat/mpeg.c
> > ===================================================================
> > --- libavformat/mpeg.c	(revision 11372)
> > +++ libavformat/mpeg.c	(working copy)
> > @@ -125,7 +125,7 @@
> >
> >      if (c < 0)
> >          c = get_byte(pb);
> > -    pts = (int64_t)((c >> 1) & 0x07) << 30;
> > +    pts = (int64_t)(c & 0x0e) << 29;
> >      val = get_be16(pb);
> >      pts |= (int64_t)(val >> 1) << 15;
> >      val = get_be16(pb);
>
> OK

Applied.

--Ivo




More information about the ffmpeg-devel mailing list