[FFmpeg-cvslog] r13905 - trunk/ffserver.c
Baptiste Coudurier
baptiste.coudurier
Mon Jun 23 10:31:48 CEST 2008
M?ns Rullg?rd wrote:
> bcoudurier <subversion at mplayerhq.hu> writes:
>
>> Author: bcoudurier
>> Date: Mon Jun 23 05:21:40 2008
>> New Revision: 13905
>>
>> Log:
>> fix compilation, this should be better
>>
>> Modified:
>> trunk/ffserver.c
>>
>> Modified: trunk/ffserver.c
>> ==============================================================================
>> --- trunk/ffserver.c (original)
>> +++ trunk/ffserver.c Mon Jun 23 05:21:40 2008
>> @@ -2158,10 +2158,11 @@ static int http_prepare_data(HTTPContext
>> }
>> }
>> } else {
>> - send_it:
>> AVCodecContext *codec;
>> - AVStream *ist = c->fmt_in->streams[source_index];
>> - AVStream *ost = ctx->streams[pkt.stream_index];
>> + AVStream *ist, *ost;
>> + send_it:
>> + ist = c->fmt_in->streams[source_index];
>> + ost = ctx->streams[pkt.stream_index];
>> /* specific handling for RTP: we use several
>> output stream (one for each RTP
>> connection). XXX: need more abstract handling */
>
> This is invalid. If you jump in after a declaration, there is no
> guarantee that the (stack) space has been allocated. You have to move
> those declarations out to a block containing both the goto statement
> and the label.
>
Yes I figured that out pretty quickly. I learnt something today, besides
that what you get by hearing that "never use goto" policy, when you
finally learn when to use it, you miss all the concepts :/
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
More information about the ffmpeg-cvslog
mailing list