[mythtv] DVB teletext: double free or corruption error
Jyrki Niskala
jyrki.n at telia.com
Fri May 6 04:39:21 UTC 2005
Hi there
I have been struggling a couple of weeks (not fulltime ;-)) with the
"double free or corruption error" when receiving teletext streams. I'm
pretty sure how it appears and I have one solution to fix it.
The problem appears when a teletext packet is immediately followed by
PAT/PMT packets.
The TS-stream is like this: TT->PAT->PMT. I think PAT and PMT packets
are injected every 2000th packet by the dvbrecorder. Since PAT and PMT
are section data they are not touching AVPacket at all. But when PMT is
parsed it will ending up with stop_parse = 1 (via set_service_cb) and
control is given to AVFormatDecoder with an invalid AVPacket (last non
PAT/PMT packet). I think this will give effects on A/V streams too, but
they seems to be better protected.
My fix is simply to remove "ts->stop_parse = 1;" in function
"set_service_cb()" in file libavformat/mpegts.c . This will make the
parser to fetch next packet in stream.
I'm not sure if this is the way to go or are there better solutions?
Regards Jyrki Niskala
More information about the mythtv-dev
mailing list