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

Ronald S. Bultje rsbultje
Sun Mar 1 16:28:27 CET 2009


Hi Luca,

On Sun, Mar 1, 2009 at 6:11 AM, Luca Abeni <lucabe72 at email.it> wrote:
> Ronald S. Bultje wrote:
>> 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
>> MPEG-TS.
>
> Looks ok. I do not remember when the release is, but if it is near I'd
> suggest to commit this patch after the release.

Good idea, will do.

> ASF and RM clearly need a special treatment, and if I understand well
> your code is identifying them based on the fact that they use a dynamic
> payload type... I suspect this is not the best way to address this
> problem (it can create strange interactions with H.264 parsing, for
> example). I suspect that handling ASF and similar in the same codepath
> used for MPEG TS would be simpler (of course it will require some
> changes, but I suspect that in the end the code would look cleaner).

You mean because the codec in ASF/RM could be h264? I don't thnk it
leads to conflicts, don't forget that if there is a dynamic payload
handler, its s->parse_packet func will always be used before any
generic functions in rtp_parse_packet(). This will always work. ASF
does use the RTP headers in the end, so calling rtp_parse_packet() for
barsing of these bits is OK. RM doesn't use this codepath at all (it
uses ff_rdt_parse_packet()), so no worries there either.

Anyway, I might be wrong of course, but if I am, we'll see bugs coming
in at some point. :-). No bugs, then it probably works. (Don't take
this wrong, I have some outstanding bugs and missing features in the
ASF/RDT code, but these are relatively minor.)

Ronald




More information about the ffmpeg-devel mailing list