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

Ronald S. Bultje rsbultje
Sat Feb 28 18:38:58 CET 2009


On Sat, Feb 28, 2009 at 12:36 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> Hi,
> There's this problem with proprietary protocols that they screw up.
> For MS/ASF/RTP, what happened is that in multi-stream sessions, say
> one where you're reading audio and video or where you have a high- and
> a low-bitrate stream, there are (or could be) two active streams. Yet,
> incoming RTP packets, regardless of TCP/UDP etc., will always have the
> stream-id 0 (i.e. for TCP, the id after $ is 0, or for UDP, everything
> arrives over a single RTP connection). The packet data containing the
> ASF packet contains the actually correct stream-id, which is parsed in
> asf.c.
> Basically this means that the stream parameter in rtp_parse_packet()
> and downstream functions is useless when there's an ASF payload. And
> indeed, we basically don't use it except as a buffer cache (and that
> works fine). However, rtpdec.c finalize_packet() overwrites
> pkt->stream_index with st->index, and you can probably imagine that
> this blows up. So, I'd like to be able to have the RTP payloader's
> parse_packet() function fill in stream_index instead of having
> finalize_packet() overwrite it.
> I can do two things:
> - do pkt->stream_index = st->index before calling the parse_packet()
> function in rtp_parse_packet()
> - make the payload parsers responsible for this.
> My patch here implements the second solution, but the first would be
> equally fine with me.

+ actual patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dont-touch-st_id.patch
Type: application/octet-stream
Size: 3033 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090228/782151f7/attachment.obj>

More information about the ffmpeg-devel mailing list