[FFmpeg-devel] [PATCH] rtpdec.c: don't overwrite pkt->stream_index in finalize_packet()

Luca Abeni lucabe72
Sat Feb 28 19:38:12 CET 2009

Ronald S. Bultje wrote:
> Hi Luca,
> On Sat, Feb 28, 2009 at 2:03 PM, Luca Abeni <lucabe72 at email.it> wrote:
>> Looking at your patch, I wonder on which tree it is based: AFAIK the
>> current code only calls finalize_packet() for static payloads (yes, this
>> is a bug and needs to be fixed).
> Only for the first AVPacket in a RTP packet. The remainder is handled
> by repeatedly calling rtp_parse_packet() with NULL/0 buf/size (handled
> in the top part of rtp_parse_packet())

Wow... That part of code looks... Scary.
But it might explain the funny comment in rtp_parse_mp4_au()...

> and then finalize_packet() is
> called in all cases.

This looks like the only correct thing done by that code.

> And now that you mention it, I suppose this means
> h264 isn't actually setting stream_index for the first buffer.

I think that multiple H.264 frames in the same packet are not currently 
supported... So I am wondering how the H.264 payload is correctly handled.

> On that line, I suppose attached patch fixes the same issue and is in
> fact much simpler.

I suspect this would break the timestamps for all the frames that are 
not the first one in an RTP packet.


More information about the ffmpeg-devel mailing list