[FFmpeg-cvslog] r13905 - trunk/ffserver.c

Måns Rullgård mans
Mon Jun 23 10:24:37 CEST 2008


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.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-cvslog mailing list