[FFmpeg-devel] [PATCH] Maximum number of frames in an RTP packet

Luca Abeni lucabe72
Wed Sep 26 14:37:47 CEST 2007


Hi Michael,

Michael Niedermayer wrote:
[...]
>> +    s->max_frames_per_packet = 0;
>> +    if (s1->max_delay) {
>> +        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
>> +            if (st->codec->frame_size == 0) {
>> +                av_log(s1, AV_LOG_ERROR, "Cannot respect max delay: frame size = 0\n");
>> +            } else {
>> +                s->max_frames_per_packet = av_rescale(s1->max_delay, st->codec->sample_rate, AV_TIME_BASE * st->codec->frame_size);
> 
> this should use av_rescale_rnd() if you want max_delay strictly followed
Thanks; I did not notice that av_rescale() rounds to the nearest.

> and the patch looks mostly ok (didnt review to carefull...)
> but iam not rtp maintainer ...
Well, I think part of the problem is that we have no RTP maintainer ;-)
I was going to propose myself as a maintainer for the RTP muxer, hoping
that someone else can take care of the demuxer...

Anyway, I'll fix the patch using av_rescale_rnd(), and I'll commit it next
week (so that other people have time to comment).


			Thanks,
				Luca




More information about the ffmpeg-devel mailing list