[mythtv] [mythtv-commits] Ticket #5283: startup with non unity timestretch doesnt work properly
John P Poet
jppoet at gmail.com
Sun May 4 16:33:23 UTC 2008
On Sat, May 3, 2008 at 11:35 PM, Mark Spieth <mark at digivation.com.au> wrote:
> > (gdb) print org_waud
> > $2 = 1536000
> > (gdb) print ob
>
> now this is interesting. someone else provided a patch for this overflow.
> here is my version.
> I havent seen the line(s) printed yet but it looks like it can happen. let
> me know if it fixes things for you and Ill add the patch to the ticket
> (without the prints of course).
>
> mark
>
> --- libs/libmyth/audiooutputbase.cpp (revision 17246)
> +++ libs/libmyth/audiooutputbase.cpp (working copy)
> @@ -1040,6 +1045,11 @@
>
> bdiff = kAudioRingBufferSize - amount;
> org_waud += amount;
> + if (org_waud >= kAudioRingBufferSize)
> + {
> + VERBOSE(VB_IMPORTANT, QString("org_waud >=
> kAudioRingBufferSize %1 %2").arg(org_waud).arg(amount));
> + org_waud -= kAudioRingBufferSize;
> + }
> }
> }
> else
> @@ -1069,6 +1079,11 @@
> org_waud += nSamples * audio_bytes_per_sample;
> nSamplesToEnd -= nSamples;
> }
> + if (org_waud >= kAudioRingBufferSize)
> + {
> + VERBOSE(VB_IMPORTANT, QString("org_waud >=
> kAudioRingBufferSize %1 %2
> %3").arg(org_waud).arg(nSamples).arg(audio_bytes_per_sample));
> + org_waud -= kAudioRingBufferSize;
> + }
>
> newLen += nSamples * audio_bytes_per_sample;
> len -= nSamples * audio_bytes_per_sample;
That fixes it. It takes care of the problem even when running SMT.
I am attaching what I actually used, since it is slightly different
because I am currently running the "fixes" branch.
On a side note; I usually run TRUNK, but the last time I tried to
"upgrade" to it, I go some nasty DB errors when I started up
mythbackend. Is that still the case, or does going from DB version
1214 to DB version 1220 work well, now?
I know that TRUNK recently has been highly volatile. Is that still
the case? I don't mind running on the edge, as long as I don't miss
any recordings.
Thanks,
John
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
More information about the mythtv-dev
mailing list