summaryrefslogtreecommitdiffstats
path: root/ffserver.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-07-03 21:09:06 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-07-03 21:09:06 +0000
commit1b52b6bd6bc1d0671432246afe48d7d61dd7be1d (patch)
treeeff9d69d4880d9d3e0458b08ce423a24732934f6 /ffserver.c
parente103117177a23b95a37bbac5720dedf3b0312622 (diff)
downloadffmpeg-streaming-1b52b6bd6bc1d0671432246afe48d7d61dd7be1d.zip
ffmpeg-streaming-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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ffserver.c b/ffserver.c
index d8cbef5..8b82b97 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;
OpenPOWER on IntegriCloud