[vlc-devel] Errors in TS/PMT/PAT handling [1/1]
andy_vl at ananam.com
Sat Jul 26 17:56:05 CEST 2003
I've found a couple of errors in ts.c which are fixed in the attached
patch. One of the errors is in the MODULE_NAME_IS_ts_dvbpsi part of the
file, the other is in both parts of the file but I've only fixed it in
the MODULE_NAME_IS_ts_dvbpsi part.
As a matter of interest, is the MODULE_NAME_IS_ts part used at all - I
think I read somewhere that VLC must always be compiled with libdvbpsi?
1. In TS_DVBPSI_HandlePMT(), when an updated PMT is received, the new
streams from the PMT are added without either checking if the streams
are already present or removing the old streams. The result is that the
number of streams in the program increases every time a new version of
the PMT is received.
In TS_DecodePMT() this is done correctly.
The attached patch fixes this in TS_DVBPSI_HandlePMT().
2. When a PAT is being processed and the ES for a PMT is added, memory
is malloc'd for the es_ts_data_t by input_AddES(). In this structure is
a pointer, p_psi_section and memory is also malloc'd for this. However,
when the ES is removed by input_DelES() the es_ts_data_t memory is
free'd but the p_psi_section data is not free'd leading to a memory
The attached patch fixes this in TS_DVBPSI_HandlePAT() by just removing
the malloc of the p_psi_section since it isn't used at all in
MODULE_NAME_IS_ts_dvbpsi part of ts.c.
I have not fixed this in the MODULE_NAME_IS_ts part of ts.c - to do so
either requires moving es_ts_data_t to become available to input_DelES()
or moving p_psi_section into es_descriptor_t
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1448 bytes
More information about the vlc-devel