[FFmpeg-devel] [PATCH] rtpdec.c: don't overwrite pkt->stream_index in finalize_packet()
Ronald S. Bultje
Sat Feb 28 20:35:08 CET 2009
On Sat, Feb 28, 2009 at 1:54 PM, Luca Abeni <lucabe72 at email.it> wrote:
> Ronald S. Bultje wrote:
>>>> 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.
>> The code is only executed if s->parse_packet is non-NULL, and for the
>> first frame in a RTP packet finalize_packet() isn't called either if
>> s->parse_packet is non-NULL. So either it breaks it consistently
>> (which would suck less), or it isn't actually necessary. I don't know
>> which one is true.
> As I said, the fact that finalize_packet() is not called for the first
> packet is a bug that should be fixed... Your last patch makes the code
> more consistent by introducing the bug in the codepath that is
> currently correct, but I do not like this kind of consistency ;-)
How about attached? I removed pkt->stream_index, moved it to the only
calling place where it is relevant and added finalize_packet() in more
general places so it is consistently called. It is skipped for
I'm thinking it should be skipped for ASF/RM as well, since these are
container-formats (like MPEG-TS), but don't know how to do that yet.
Any suggestions? In fact, RM isn't really needed since that is handled
by rdt.c, rtp_parse_packet() is never called. But it'd be nice to do
this correctly for ASF...
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1390 bytes
Desc: not available
More information about the ffmpeg-devel