diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-07-03 21:09:06 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-07-03 21:09:06 +0000 |
commit | 1b52b6bd6bc1d0671432246afe48d7d61dd7be1d (patch) | |
tree | eff9d69d4880d9d3e0458b08ce423a24732934f6 /ffserver.c | |
parent | e103117177a23b95a37bbac5720dedf3b0312622 (diff) | |
download | ffmpeg-1b52b6bd6bc1d0671432246afe48d7d61dd7be1d.tar.gz |
segfault fix by (Giancarlo Formicuccia <ilsensine at inwind dot it>)
Originally committed as revision 2003 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ffserver.c b/ffserver.c index d8cbef5331..8b82b9794b 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2237,6 +2237,10 @@ static int http_prepare_data(HTTPContext *c) if (c->is_packetized) { c->packet_stream_index = pkt.stream_index; ctx = c->rtp_ctx[c->packet_stream_index]; + if(!ctx) { + av_free_packet(&pkt); + return -1; + } codec = &ctx->streams[0]->codec; /* only one stream per RTP connection */ pkt.stream_index = 0; |