[FFmpeg-devel] [PATCH] Small improvement of MPEG-PES get_pts
Måns Rullgård
mans
Thu Jan 3 02:57:44 CET 2008
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
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list