X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmpegts.c;h=e5ae4d64412e2172897753bbf6a8770fe0ceaa9e;hb=ce2b665b3dec00675bd374a2ad9a4d20a86bb618;hp=bd86fafea01cc5f45fb8354334af3640a4bb0801;hpb=5fd63f3c3b316a348bc76353b2b2956d5182135d;p=ffmpeg diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index bd86fafea01..e5ae4d64412 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -18,8 +18,9 @@ * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "libavutil/crc.h" #include "avformat.h" -#include "crc.h" #include "mpegts.h" //#define DEBUG_SI @@ -227,7 +228,7 @@ static int discard_pid(MpegTSContext *ts, unsigned int pid) } } - return (!used && discarded); + return !used && discarded; } /** @@ -767,6 +768,8 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len if(program) av_set_program_name(program, provider_name, name); } + av_free(name); + av_free(provider_name); break; default: break; @@ -1370,6 +1373,9 @@ static int mpegts_read_close(AVFormatContext *s) { MpegTSContext *ts = s->priv_data; int i; + + clear_programs(ts); + for(i=0;ipids[i]) mpegts_close_filter(ts, ts->pids[i]);