Mercurial > libavformat.hg
comparison mmsh.c @ 6418:2f0124b97014 libavformat
stream_selection can be freed in the fail case, in which case it's unassigned.
Therefore, init it with NULL to prevent a crash on invalid streams.
Patch by Zhentan Feng <spyfeng gmail com>.
author | rbultje |
---|---|
date | Sat, 28 Aug 2010 23:55:26 +0000 |
parents | c2e5016e2b4e |
children | abd88124e6a9 |
comparison
equal
deleted
inserted
replaced
6417:d2d2972c9715 | 6418:2f0124b97014 |
---|---|
212 | 212 |
213 static int mmsh_open(URLContext *h, const char *uri, int flags) | 213 static int mmsh_open(URLContext *h, const char *uri, int flags) |
214 { | 214 { |
215 int i, port, err; | 215 int i, port, err; |
216 char httpname[256], path[256], host[128], location[1024]; | 216 char httpname[256], path[256], host[128], location[1024]; |
217 char *stream_selection; | 217 char *stream_selection = NULL; |
218 char headers[1024]; | 218 char headers[1024]; |
219 MMSHContext *mmsh; | 219 MMSHContext *mmsh; |
220 MMSContext *mms; | 220 MMSContext *mms; |
221 | 221 |
222 mmsh = h->priv_data = av_mallocz(sizeof(MMSHContext)); | 222 mmsh = h->priv_data = av_mallocz(sizeof(MMSHContext)); |