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

Diego Biurrun diego
Fri Jan 8 00:26:20 CET 2010


On Thu, Jan 07, 2010 at 06:17:16PM -0500, Ronald S. Bultje wrote:
> 
> 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.

This is not reformatting, whichever way you look at it.  People have
been burned at the stake for such offenses in the past.  Good luck.

> I can revert and re-apply in two separate steps, but it seems a bit
> pointless.

I don't much care.

> (Don't forget I sent the patch to the list twice and nobody
> objected to that being part of the patch.)

Do you really think anybody reviewed it in that much detail?
I sure didn't.  IMO the only changes that 'svn diff -x -ubw' should
show in a reformatting commit are long lines being broken, braces
shuffled around and similar.

Diego



More information about the ffmpeg-cvslog mailing list