Mercurial > libavformat.hg
comparison mpegts.c @ 1046:92c01be95bbf libavformat
fix memory leak on mpegts close
found by Andy Brown <abrown at daqtron com>
author | mru |
---|---|
date | Sat, 01 Apr 2006 18:19:00 +0000 |
parents | 2177aea28f4f |
children | 76c75a88560d |
comparison
equal
deleted
inserted
replaced
1045:7f1b7f811f01 | 1046:92c01be95bbf |
---|---|
1372 { | 1372 { |
1373 MpegTSContext *ts = s->priv_data; | 1373 MpegTSContext *ts = s->priv_data; |
1374 int i; | 1374 int i; |
1375 for(i=0;i<NB_PID_MAX;i++) | 1375 for(i=0;i<NB_PID_MAX;i++) |
1376 if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]); | 1376 if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]); |
1377 | |
1378 for(i = 0; i < ts->nb_services; i++){ | |
1379 av_free(ts->services[i]->provider_name); | |
1380 av_free(ts->services[i]->name); | |
1381 av_free(ts->services[i]); | |
1382 } | |
1383 av_freep(&ts->services); | |
1384 | |
1377 return 0; | 1385 return 0; |
1378 } | 1386 } |
1379 | 1387 |
1380 static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, | 1388 static int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, |
1381 int64_t *ppos, int64_t pos_limit) | 1389 int64_t *ppos, int64_t pos_limit) |