[FFmpeg-devel] Realmedia patch
Ronald S. Bultje
rsbultje
Tue Sep 2 14:51:51 CEST 2008
Hi,
On Sun, Aug 31, 2008 at 6:43 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> On Sun, Aug 31, 2008 at 3:37 PM, Luca Abeni <lucabe72 at email.it> wrote:
>> Ronald S. Bultje wrote:
> [..]
>>> +static void
>>> +finalize_packet(RTPDemuxContext *s, AVPacket *pkt, uint32_t ts)
>>> +{
>>> + pkt->pts = ts;
>>> + pkt->stream_index = s->st->index;
>>> +}
>>
>> Why this separate function? It looks useless.
>
> Removed. I'm still using a temporary variable, hope that's OK, because
> I use it in some calls to ff_rm_*() also.
So... I made one modification in this patch, it allowed me to get
video to work, but it's kind of ugly:
in rtsp_read_packet():
@@ -1246,6 +1246,8 @@
ret = url_readbuf(rt->rtsp_hd, buf, len);
if (ret != len)
return -1;
+ if (rt->server_type == RTSP_SERVER_RDT)
+ id = (buf[0] >> 1) & 0x1f;
/* find the matching stream */
for(i = 0; i < rt->nb_rtsp_streams; i++) {
I just found out that the byte after $ is always 0, which is maybe why
Luca was confused and thought they only contain one stream. However,
they really contain multiple streams, but the RTP^d^dDT header
apparently uses the 4th byte after the $ for the stream, as per above.
I can move this to ff_rdt_parse_packet() if you prefer it there, I
just did it in rtsp.c for now because that's where stream id is found
for RDT.
Ronald
More information about the ffmpeg-devel
mailing list