[FFmpeg-devel] Fwd: Errors when getting data from RTSP source

Luca Abeni lucabe72
Fri Jul 10 09:32:51 CEST 2009


Stas Oskin wrote:
>> Look at the seq variable in libavformat/rtpdec.c:rtp_parse_packet().
>>
> 
> 
> Ok, so just buffering the coming packets, and re-ordering them according to
> sequence, would do the trick?

Probably yes


> Any advised details, such as how many re-ordered packets may arrive (which
> translates, to how large such buffer/list should be)?

I believe this should be settable by the user (of course, libavformat must
provide a reasonable default). The delay in delivering received frames depends
on the amount of buffering, and for some applications (for example,
video-conferencing) a low delay is more important than receiving all the
packets. For other applications (for example, VoD) delay is not important and
the video quality is fundamental.

AVFormatContext already contains a max_delay field that (IMHO) can be used
to specify the maximum amount of buffering (in time units). Currently, only
some muxers use it, but I think this usage in the RTP demuxer is legitimate.


> Another question, is this seq variable exposed in any way to external
> applications (which use libavcodec)?

No, it is something internal to RTP that should not be exported to the user.



				Luca



More information about the ffmpeg-devel mailing list