<div class="gmail_quote">On Thu, Jul 12, 2012 at 1:11 AM, Lawrence Rust <span dir="ltr">&lt;<a href="mailto:lvr@softsystem.co.uk" target="_blank">lvr@softsystem.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, 2012-07-11 at 22:52 +0100, Peter Mitchell wrote:<br>
[snip]<br>
<div class="im">&gt; This is a great set of patches that has restored my ability to playback<br>
&gt; encrypted DVD iso images sadly lost when I upgraded from 0.21 to 0.25.1<br>
&gt; fixes and switched my video collection over to use storage groups without<br>
&gt; realizing the ramifications. Thanks for maintaining this Lawrence!<br>
&gt;<br>
&gt; There is however a minor bug in<br>
&gt; mythpatches-0.24/mythtv-0.25//0034-Mythvideo-restore-DVD-ripping.patch.<br>
<br>
</div>You must mean<br>
mythtv-0.25/0043-libmythtv-Play-encrypted-dvd-s-and-iso-images-from-s.patch<br>
<div class="im"><br>
&gt; With the patch installed I found that intermittently the playback of any iso<br>
&gt; image regardless of being encrypted or not would fail. Indeed the same image<br>
&gt; might play one time and then fail to play subsequently due to seek errors<br>
&gt; when reading the iso image.<br>
&gt;<br>
&gt; Fortunately the issue is easy to resolve. In class dvdstream.cpp variable<br>
&gt; m_start is not being initialized at instantiation by the constructor which<br>
&gt; means it is initially set to whatever happened to be on the heap when the<br>
&gt; class is instantiated. As this variable is being used as an offset for seeks<br>
&gt; within the iso image this quickly leads to problems unless you get lucky and<br>
&gt; m_start happened to be randomly set to zero.<br>
&gt;<br>
&gt; To fix simply change the constructor to set m_start to zero. If this is done<br>
&gt; then this patch works everytime - well for me at least!<br>
&gt; As an example the DVDStream constructor could be changed from this:<br>
&gt;<br>
&gt; DVDStream::DVDStream(const QString&amp; filename)<br>
&gt; : RingBuffer(kRingBuffer_File), m_reader(0), m_pos(0), m_title(-1)<br>
&gt; {<br>
&gt;     OpenFile(filename);<br>
&gt; }<br>
&gt;<br>
&gt; To this:<br>
&gt; DVDStream::DVDStream(const QString&amp; filename)<br>
&gt; : RingBuffer(kRingBuffer_File), m_reader(0), m_pos(0), m_title(-1),<br>
&gt; m_start(0)<br>
&gt; {<br>
&gt;     OpenFile(filename);<br>
&gt; }<br>
&gt;<br>
<br>
</div>Well spotted and thanks ever so much for taking the time to test and<br>
find a fix.  Much appreciated.<br>
<br>
That will teach me to double check my patches with valgrind before<br>
posting them.  It&#39;s a pity that gcc doesn&#39;t pick this out with a warning<br>
for an uninitialised variable - must look into that.<br>
<div class="im"><br>
&gt; I noticed that the trunk version of the patch appears to have the same<br>
&gt; issue.<br>
<br>
</div>I&#39;ll fix that too.<br>
<br>
Hopefully sometime soon these patches will find their way into git<br>
master.<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>Did these patches ever make it into git master? I have libdvdcss2 installed (along with all the necessary dvdnav and dvdread pkgs) and it&#39;s not getting picked up by mythvideo when I play an ISO file. I see these messages from the frontend:</div>
<div><div>libdvdnav: Using dvdnav version svnR1215</div><div>libdvdread: Encrypted DVD support unavailable.</div></div><div><br></div><div>When I use mplayer to play the same file before the video starts playing it automatically launches libdvdcss and I see it create files inside ~/.dvdcss. </div>
<div><br></div><div>Is there some way to have mythtv/mythvideo do this? Lawrence&#39;s links are broken, anyone have an updated version?</div><div><br></div><div>Thanks,</div><div>-Greg</div></div>