rtsp/rdt: Assign the RTSPStream index to AVStream->id

This is used for mapping AVStreams back to their corresponding
RTSPStream. Since d9c0510, the RTSPStream pointer isn't stored in
AVStream->priv_data any longer, breaking this mapping from AVStreams
to RTSPStreams.

Also, we don't need to clear the priv_data in rdt cleanup any longer,
since it isn't set to duplicate pointers.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b2dd842d21)
This commit is contained in:
Martin Storsjö
2011-02-11 23:36:47 +02:00
committed by Michael Niedermayer
parent b7195837cd
commit ae9c5ea2ad
3 changed files with 5 additions and 11 deletions

View File

@@ -322,7 +322,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
if (!strcmp(ff_rtp_enc_name(rtsp_st->sdp_payload_type), "MP2T")) {
/* no corresponding stream */
} else {
st = av_new_stream(s, 0);
st = av_new_stream(s, rt->nb_rtsp_streams - 1);
if (!st)
return;
rtsp_st->stream_index = st->index;