Re: Memory corruption while watching DVB

Torsten Jager <[email protected]> Wed, 22 Jan 2014 15:25:55 +0100
Newsgroups gmane.comp.video.xine.devel
Message-ID <[email protected]>
Hello.

Sorry for the delay. I thought Petri would like to handle this one.

> I've just tried to watch some DVB-T and DVB-T2 channels via
> xine-lib-1.2, and the playback starts running into problems after a few
> minutes. I am suspecting memory corruption, particularly after it
> crashed like this:
>
> *** Error in `xine': double free or corruption (fasttop):
> 0x00000000021441d0 ***
> xiTK received SIGSEGV signal, RIP.
>
> A rudimentary bisection via repeated use of "hg update N" suggests that
> the first bad commit is:
>
> changeset:   12445:fc5aea61e9b1
> user:        Petri Hintukainen <[email protected]>
> date:        Wed Nov 06 13:49:58 2013 +0200
> files:       ChangeLog m4/summary.m4 src/combined/ffmpeg/Makefile.am
> src/combined/ffmpeg/demux_avformat.c
> src/combined/ffmpeg/ffmpeg_decoder.c src/combined/ffmpeg/ffmpeg_decoder.h
> description:
> Add avformat demux plugin.
>     - Support for new formats and protocols.
>     - Proper rtsp support (with avformat+rtsp://, rtsp+tcp:// and
> rtsp+http:// mrls).
>     - by default native xine demux plugins are probed first.
>       This can be overridden in config, by selecting demuxer in mrl
> (#demux:avformat),
>       or by using "avformat+" mrl prefix.

If this commit is really the guilty then it means that xines own
mpeg-ts demuxer (who normally handles dvb) failed to recognize
the input. New avformat demuxer (who is possibly broken) then
takes over.

Detecting ts is not an exact science. A ts stream contains 0x47
markers every ts_packet_size bytes. Of course, such bytes may
also appear inside packets, having a different meaning there.

I discovered that xine native demuxer sometimes chokes when
seeking into a ts stream. I will take a look at the resync code
and try to make it more robust.

Try moving away that plugin .so temporarily for testing.

Stepping back and taking a general view, an avformat plugin by
itself comes close to a xine bankruptcy statement. But that
is only my personal opinion.

>
> In a separate issue, xine is also crashing almost immediately when I
> enable interlacing while watching a DVB-T MPEG2 channel. However,
> interlacing seems OK with DVB-T2 MPEG4 channels.

Hmm. I tend to not using deinterlacing as is costs some image
sharpness. Maybe we should port that quite good mplayer
"kerndeint" filter?

I suggest running xine in gdb, and doing "thread apply all bt"
when it crashes.

Torsten


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk