[FFmpeg-devel] [PATCH] RTP depacketizer for H.263

Ronald S. Bultje rsbultje
Tue Jan 26 15:43:45 CET 2010


Hi Martin,

On Tue, Jan 26, 2010 at 3:00 AM, Martin Storsj? <martin at martin.st> wrote:
>> Lastly, could you read buf[0]/buf[1] as a BE16
>> and easify the calculation of plen?
[..]
> +    startcode      = (buf[0] & 0x04) >> 1;
> +    vrc            =  buf[1] & 0x02;
> +    picture_header = (AV_RB16(buf) & 0x01f8) >> 3;

I actually meant to index them all, now you read the memory twice. I.e.:

+    flags          =  AV_RB16(buf);
+    startcode      = (flags & 0x0400) >> 17;
+    vrc            =  flags & 0x02;
+    picture_header = (flags & 0x01f8) >> 3;

But that's nitpicking, either way is fine with me. If you prefer
current behaviour, then this is OK also. Patch OK.

Ronald



More information about the ffmpeg-devel mailing list