[mythtv-users] All videos pause secs before their end

Jonatan Lindblad mythtv at comhem.se
Sat May 18 12:23:09 UTC 2013


On 2013-05-18 12:15, Jean-Yves Avenard wrote:
> On 18 May 2013 09:24, Richard <peper03 at yahoo.com> wrote:
>>
>> On 16/05/13 20:06, Yianni Vidalis wrote:
>>>
>>> I am facing a very strange problem on one specific frontend. If I let
>>> any video play until the end, it enters pause 0-4 secs before end (the
>>> actual numbers I've noticed). Pressing "i" shows the video as paused. I
>>> can exit the video by pressing esc or "play", but it's annoying. No
>>> other frontend exhibits this behaviour.
>>> The system is an amd 5050e, with Nvidia 9500GT, using vdpau for playback
>>> and optical 5.1 sound output.
>>>
>>> Recordings are not affected.
>>
>>
>> Coincidentally, I just discovered the same problem.  It seems to be caused by a non-initialised member variable relating to playback of MHEG streams (e.g. BBC iPlayer).
>>
>> I've added a patch to the ticket which added this functionality to master.  I didn't create a new ticket, as the original ticket was still open.
>>
>> The patch is here:
>> http://code.mythtv.org/trac/attachment/ticket/10019/0001-Added-missing-initialisation-of-MHEG-member-variable.patch
>>
>> I'll admit I've not investigated too much here but it seemed to cure the problem for me.
>>
>> You could try running the frontend with -v mheg and look for a line starting '[mhi] Stream 0x' when playback pauses.
>>
>> Richard.
>
> This is surprising that this patch fixes anything other than a warning.

It's not surprising to me :)

> C++ should call the default constructor for m_notify, which is an int
> and the default constructor for a int is to set it to 0...

There is zero-initialization which looks like a constructor call:

   int i = int();  // i is initialized to 0
   int j;          // j is uninitialized

Here are some more examples of what can happen:

   class A {
     public:
       int b;
       int c;
   };

   A d;       // b and c are uninitialized
   A e = A(); // b and c are initialized to 0

Add a constructor that only initializes b and you get this:

   class A {
     public:
       A() : b() {}
       int b;
       int c;
   };

   A d;       // b is initialized to 0, but c is not
   A e = A(); // b and c are initialized to 0

--
Jonatan


More information about the mythtv-users mailing list