[FFmpeg-devel] Realmedia patch

Luca Abeni lucabe72
Fri Aug 22 22:06:17 CEST 2008

Ronald S. Bultje wrote:
>> I think that we should only use standard tags here (and not the "RMFF",
>> "OpaqueData", "ASMRuleBook", ... keywords used by real). Can you just
>> call parse_sdp_a_line() in the final "else" case (without checking for
>> any particular tag)? Then, you can check for the real tags in the
>> rdt_parse_sdp_line() function.
> So s/else if(..||..||..)/else/? Sure, no problem.

Yes... Does this work for you?
Index: libavformat/rtsp.c
--- libavformat/rtsp.c  (revision 14908)
+++ libavformat/rtsp.c  (working copy)
@@ -527,6 +527,12 @@
              rtsp_parse_range_npt(p, &start, &end);
              s->start_time= start;
              s->duration= (end==AV_NOPTS_VALUE)?AV_NOPTS_VALUE:end-start; // AV_NOPTS_VALUE means live broadcast (and can't seek)
+        } else if (s->nb_streams) {
+            st = s->streams[s->nb_streams - 1];
+            rtsp_st = st->priv_data;
+            if (rtsp_st->dynamic_handler && rtsp_st->dynamic_handler->parse_sdp_a_line) {
+                rtsp_st->dynamic_handler->parse_sdp_a_line(st, rtsp_st->dynamic_protocol_context, buf);
+            }
(clearly, you have to move "AvgBitRate" handling in rdt_parse_sdp_line())

If yes, I'd say that this hunk should be committed (but let's hear if
Michael and Luca B. are ok with this).

>> I also have another question: it seems to me that in this patch
>> (rtsp-realmedia.patch) you are not explicitly creating new AVStreams
>> with av_new_stream. So, only one AVStream is created, when the "m=" SDP
>> line is parsed. But an RM stream can contain more than one stream (for
>> example, an audio stream and a video stream), right? Where are the
>> additional AVStreams created? I am wondering if it would simpler to use
>> an approach similar to the one used for parsing TS in RTP (not creating
>> and AVStream in rtsp.c, but leave the streams creation to the RM demuxer)?
> I have honestly only tested with single-stream real streams...

Ah, ok... This was just an idea I had when looking at the "TS in RTP"


More information about the ffmpeg-devel mailing list