mirror of
https://github.com/mpv-player/mpv
synced 2025-03-03 12:47:49 +00: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:
parent
5c51b13785
commit
d17ac2d7bf
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user