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

Luca Abeni lucabe72
Sun Mar 1 18:11:58 CET 2009


Hi Ronald,

Ronald S. Bultje wrote:
[...]
>> 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?

No, I was not thinking about this. In my comment about H.264 I was 
referring to the fact that you seem to parse ASF in the codepath used 
for "regular codecs" (s->st != NULL) and to use s->parse_packet to 
distinguish it from other codecs. As H.264 uses s->parse_packet too, 
every time you change something to make ASF over RTP happy you risk to 
change the H.264 payload behaviour too.

My guess is that parsing ASF over RTP in the same codepath used for TS 
over RTP would avoid these problems and would probably result in cleaner 
code.

> ASF
> does use the RTP headers in the end, so calling rtp_parse_packet() for
> barsing of these bits is OK.

I was not suggesting to avoid calling rtp_parse_packet()... I was 
suggesting to have s->st = NULL and to behave similarly to TS over RTP 
(which uses rtp_parse_packet() too).


				Luca




More information about the ffmpeg-devel mailing list