1
mirror of https://github.com/mpv-player/mpv synced 2024-10-18 10:25:02 +02:00

missing free in case sdpplin_parse_stream returns invalid stream.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18096 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-04-14 14:10:04 +00:00
parent 5c51b13785
commit d17ac2d7bf

View File

@ -238,7 +238,6 @@ static sdpplin_stream_t *sdpplin_parse_stream(char **data) {
sdpplin_t *sdpplin_parse(char *data) {
sdpplin_t *desc=calloc(1,sizeof(sdpplin_t));
sdpplin_stream_t *stream;
char *buf=xbuffer_init(32);
char *decoded=xbuffer_init(32);
int handled;
@ -249,14 +248,17 @@ sdpplin_t *sdpplin_parse(char *data) {
handled=0;
if (filter(data, "m=", &buf)) {
stream=sdpplin_parse_stream(&data);
sdpplin_stream_t *stream=sdpplin_parse_stream(&data);
#ifdef LOG
printf("got data for stream id %u\n", stream->stream_id);
#endif
if (desc->stream && (stream->stream_id >= 0) && (stream->stream_id < desc->stream_count))
desc->stream[stream->stream_id]=stream;
else
{
mp_msg(MSGT_OPEN, MSGL_ERR, "sdpplin: got 'm=', but 'a=StreamCount' is still unknown. Broken sdp?\n");
free(stream);
}
continue;
}