[MPlayer-dev-eng] Proposed patch: ignore bad consistency counter check in demux_ts

Steven Brudenell steven.brudenell at gmail.com
Thu Feb 19 23:21:49 CET 2009


This patch is to ignore the bad CC check in demux_ts, as it doesn't
appear to be critical for stream playback and actually seems to hurt
DVB applications. I would prefer to make this check optional somehow,
but I can't figure out any way to make options to pass to demuxers. If
someone can document this for me (or point me to an example where it's
currently done), I'll change this to an option.

For some time now I've had a problem where when playing high-bitrate
streams over DVB (especially 1920x1080 ones), mplayer sometimes fails
to start playing a stream. It would fill its stream cache, then exit
with an "end of file" message.

*Sometimes* it would work, and I could watch the stream normally.
There never seems to be anything wrong with the stream in this case
(not too many decoding errors, etc).

Turning up verbosity revealed messages like "GOOD CC: 3, BAD CC: 29"
shortly before exiting. It seems that demux_ts checks the "continuity
counter" bit of mpeg streams before deciding that it is indeed a TS.
Apparently these continuity counters don't come across well in
high-bitrate DVB streams for some reason.

I noticed that CCs aren't verified during stream playback (the code to
do this seems commented out, so I guess they were at some point), so I
guess this must not be that critical to stream playback.

This problem persisted across several versions of mplayer and kernel,
and even moving from Washington to Pennsylvania (so it can't possibly
be a single misconfigured system on the broadcasting end).

I decided to try removing this check, and it seems to work well. I can
now start up 1920x1080 DVB streams without any trouble. The one bad
effect is that for channels with very low signal, mplayer will start
playback with very little data to work with, and will have some
trouble. I think this is a fine tradeoff however.

I don't really know the ramifications of this change to other
applications. Can anyone fill me in?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: demux-ts-ignore-bad-cc.patch
Type: application/octet-stream
Size: 372 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090219/6dd12598/attachment.obj>


More information about the MPlayer-dev-eng mailing list