[mythtv-users] Playback of encrypted dvd iso images from storage group

Lawrence Rust lvr at softsystem.co.uk
Thu Jul 12 07:11:32 UTC 2012

On Wed, 2012-07-11 at 22:52 +0100, Peter Mitchell wrote:
> This is a great set of patches that has restored my ability to playback
> encrypted DVD iso images sadly lost when I upgraded from 0.21 to 0.25.1
> fixes and switched my video collection over to use storage groups without
> realizing the ramifications. Thanks for maintaining this Lawrence!
> There is however a minor bug in
> mythpatches-0.24/mythtv-0.25//0034-Mythvideo-restore-DVD-ripping.patch.

You must mean

> With the patch installed I found that intermittently the playback of any iso
> image regardless of being encrypted or not would fail. Indeed the same image
> might play one time and then fail to play subsequently due to seek errors
> when reading the iso image.
> Fortunately the issue is easy to resolve. In class dvdstream.cpp variable
> m_start is not being initialized at instantiation by the constructor which
> means it is initially set to whatever happened to be on the heap when the
> class is instantiated. As this variable is being used as an offset for seeks
> within the iso image this quickly leads to problems unless you get lucky and
> m_start happened to be randomly set to zero.
> To fix simply change the constructor to set m_start to zero. If this is done
> then this patch works everytime - well for me at least!
> As an example the DVDStream constructor could be changed from this:
> DVDStream::DVDStream(const QString& filename)
> : RingBuffer(kRingBuffer_File), m_reader(0), m_pos(0), m_title(-1)
> {
>     OpenFile(filename);
> }
> To this:
> DVDStream::DVDStream(const QString& filename)
> : RingBuffer(kRingBuffer_File), m_reader(0), m_pos(0), m_title(-1),
> m_start(0)
> {
>     OpenFile(filename);
> }

Well spotted and thanks ever so much for taking the time to test and
find a fix.  Much appreciated.

That will teach me to double check my patches with valgrind before
posting them.  It's a pity that gcc doesn't pick this out with a warning
for an uninitialised variable - must look into that.

> I noticed that the trunk version of the patch appears to have the same
> issue.

I'll fix that too.

Hopefully sometime soon these patches will find their way into git


More information about the mythtv-users mailing list