[FFmpeg-devel] [PATCH] Handle MP3ADU in RealRTSP, restructure rtpdec/rtsp handling of AVStream time_base

Martin Storsjö martin
Sun Dec 5 12:59:52 CET 2010


The attached patchset adds support for playing the 
rtsp://dl.lib.brown.edu:554/areserves/1093545294660883.mp3 stream, as 
added by Compn to the RTSP sample URL list a few days ago.

In order to play this back properly, I had to restructure the handling of 
AVStream time_base in rtsp/rtpdec. Earlier, time_base has always been set 
blindly in rtpdec to 90 kHz for video, and to the sample rate for audio. 
In this stream, the rtpmap says

a=rtpmap:101 X-MP3-draft-00/1000

(and RTP timestamps increase by 1000 per second) while the SDP a few lines 
later says


With the current code in rtpdec.c, where the AVStream time_base always is 
overwritten either with a default value or with the sample rate, we can't 
really handle it properly. The attached patchset changes this to set 
time_base within rtsp.c at the same time as sample_rate is set initially, 
so that the later SDP line can override only the sample rate, not the time 

I've tested this change with quite a few different streams, and didn't see 
any regression anywhere, but please do check if you know of any weird 
stream that might break.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rtpdec-Handle-MP3-in-RealRTSP.patch
Type: text/x-diff
Size: 1430 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101205/5a83689d/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-rtsp-Parse-RealRTSP-sample-rate-declarations-from-th.patch
Type: text/x-diff
Size: 1122 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101205/5a83689d/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-rtsp-rtpdec-Set-the-AVStream-time_base-directly-in-r.patch
Type: text/x-diff
Size: 4447 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101205/5a83689d/attachment-0002.patch>

More information about the ffmpeg-devel mailing list