[FFmpeg-cvslog] r21071 - trunk/libavformat/rtsp.c

Ronald S. Bultje rsbultje
Fri Jan 8 00:17:16 CET 2010


Hi,

On Thu, Jan 7, 2010 at 6:03 PM, Diego Biurrun <diego at biurrun.de> wrote:
>> @@ -101,23 +101,24 @@ static int sdp_parse_rtpmap(AVCodecConte
>>
>> ? ? ?if (payload_type >= RTP_PT_PRIVATE) {
>> - ? ? ? ?RTPDynamicProtocolHandler *handler= RTPFirstDynamicPayloadHandler;
>> - ? ? ? ?while(handler) {
>> - ? ? ? ? ? ?if (!strcasecmp(buf, handler->enc_name) && (codec->codec_type == handler->codec_type)) {
>> - ? ? ? ? ? ? ? ?codec->codec_id = handler->codec_id;
>> - ? ? ? ? ? ? ? ?rtsp_st->dynamic_handler= handler;
>> - ? ? ? ? ? ? ? ?if(handler->open) {
>> - ? ? ? ? ? ? ? ? ? ?rtsp_st->dynamic_protocol_context= handler->open();
>> - ? ? ? ? ? ? ? ?}
>> + ? ? ? ?RTPDynamicProtocolHandler *handler;
>> + ? ? ? ?for (handler = RTPFirstDynamicPayloadHandler;
>> + ? ? ? ? ? ? handler; handler = handler->next) {
>> + ? ? ? ? ? ?if (!strcasecmp(buf, handler->enc_name) &&
>> + ? ? ? ? ? ? ? ?codec->codec_type == handler->codec_type) {
>> + ? ? ? ? ? ? ? ?codec->codec_id ? ? ? ? ?= handler->codec_id;
>> + ? ? ? ? ? ? ? ?rtsp_st->dynamic_handler = handler;
>> + ? ? ? ? ? ? ? ?if (handler->open)
>> + ? ? ? ? ? ? ? ? ? ?rtsp_st->dynamic_protocol_context = handler->open();
>> ? ? ? ? ? ? ? ? ?break;
>> ? ? ? ? ? ? ?}
>> - ? ? ? ? ? ?handler= handler->next;
>> ? ? ? ? ?}
>
> What did you do there? ?Whatever it is, it's more than reformatting.

I did. It was intentional. Any while loop with an initial assignment
and per-loop variable increment, as is clearly the case here, should
be a for() loop. That's why I changed it. The code behaves exactly the
same before or after.

I can revert and re-apply in two separate steps, but it seems a bit
pointless. (Don't forget I sent the patch to the list twice and nobody
objected to that being part of the patch.)

Ronald



More information about the ffmpeg-cvslog mailing list