Doug,
I found the source of the problem ! When the frames are deleted the count
of frames is reduced. When the clip is reloaded there is a disagreement
between the number of frames in LiVES and the original clip. So the number
of frames is reduced...and when one tries to load a frame from the latter
part of the clip the decoder thinks that it is beyond the end of the clip,
so a null frame is returned.

A workaround for this is pretty easy, simply comment out the line
    fake_cdata->nframes=sfile->frames;

in saveplay.c


You can do that now and it should resolve your problem !


However that is not the whole fix. The reason that it was coded like this
is that for some clip formats it can take a few seconds to find the last
frame. If you can imagine opening a whole clip set then all those seconds
could add up to minutes. Therefore as an optimisation, the frame count was
retained and
reused when reloading. The full fix therefore involves scanning the
file_index and finding the highest frame pointed to in the index, and then
using this a max frame in the decoder plugin.



Full fix and new version to follow !


Regards,
Gabriel.




http://lives-video.com
https://www.openhub.net/accounts/salsaman

On Thu, Aug 25, 2016 at 11:00 AM, salsaman <salsa...@gmail.com> wrote:

> Doug,
> I downloaded the clip and opened it in LiVES. Deleting the first few
> frames worked fine., I was able to save the clip and reopen it with no
> problems. However when I deleted some frames from the middle of the clip,
> the part following the deletion was returning null frames. I then tested
> with another clip and the problem was absent there, so it may be particular
> to this format.
>
> I'll keep investigating and let you know.
>
>
> Regards,
> Gabriel.
>
>
>
>
>
> http://lives-video.com
> https://www.openhub.net/accounts/salsaman
>
> On Thu, Aug 25, 2016 at 3:21 AM, Doug Webb <dougw...@shaw.ca> wrote:
>
>> I didn't know I could do that! Here's a file from my ZTE Z850 smartphone
>>
>> https://drive.google.com/open?id=0B1vkg_sxbq-RUy1UeFpyT2F4TEE
>>
>>
>>
>> On 2016-08-24 03:51 PM, salsaman wrote:
>>
>> Doug,
>> can you upload a sample clip somewhere so I can test ? It sounds like it
>> is some quirk with the clip format.
>>
>>
>> Cheers
>>
>>
>>
>> http://lives-video.com
>> https://www.openhub.net/accounts/salsaman
>>
>> On Wed, Aug 24, 2016 at 6:18 PM, Doug Webb <dougw...@shaw.ca> wrote:
>>
>>> I just tested some more. It all works fine if clips are edited from the
>>> end. If a piece is removed from the beginning of a clip, the clip is not
>>> saved correctly. The other clip was fine, just the clip with frames removed
>>> from the start are affected.
>>>
>>> I can do more testing and send more results if you can't replicate the
>>> problem.
>>>
>>> Cheers,
>>> Doug
>>>
>>>
>>>
>>> On 2016-08-20 04:17 AM, salsaman wrote:
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Aug 19, 2016 at 11:56 PM, Doug Webb <dougw...@shaw.ca> wrote:
>>>
>>>> The audio will reload but I only get the few frames that were opened
>>>> virtually. It looks like the routine is saving the files listed in the
>>>> livestmp folder instead of between the file pointers you describe.
>>>>
>>>>
>>> That is not what I meant by pointers. The file_index is a binary file,
>>> where each frame entry either points to an original frame in the clip, or
>>> to a decoded frame (png or jpeg).
>>>
>>> I am still not sure what the problem is on your end. Do I understand
>>> correctly that everything is fine until you delete some frames from the
>>> beginning of the clip, then it will no longer reload ?
>>>
>>>
>>>
>>>
>>>
>>>
>>>> It's Blackberry Festival and the whole town is down on Marine Dr.
>>>> partying so we just finished dinner and are off for the evening!
>>>>
>>>>
>>> Cool ! Have fun !
>>>
>>>
>>>
>>>
>>>
>>>> Cheers,
>>>> Doug
>>>>
>>>>
>>>>
>>>> On 2016-08-19 12:54 PM, salsaman wrote:
>>>>
>>>> Doug,
>>>> that is normal. When you open a clip it will open it virtually, when
>>>> you delete the first half it will just update the pointers in the
>>>> file_index file. The few images you see are where LiVES saves the images
>>>> when they are shown in the first or last frame windows.
>>>>
>>>>
>>>> Are you able to reload the clip after deleting the first half ?
>>>>
>>>>
>>>> Regards,
>>>> Gabriel.
>>>>
>>>>
>>>>
>>>> http://lives-video.com
>>>> https://www.openhub.net/accounts/salsaman
>>>>
>>>> On Fri, Aug 19, 2016 at 3:11 PM, Doug Webb <dougw...@shaw.ca> wrote:
>>>>
>>>>> When I load a clip and then save the clip set, it reloads fine next
>>>>> time. If I delete the first half of the clip then save the clip set, the
>>>>> audio is saved but many of the frames are missing. The individual frames 
>>>>> do
>>>>> not show in the livestmp folder when the clip is initially opened. The few
>>>>> frames in the folder seem to be the only ones saved after a clip is 
>>>>> edited.
>>>>>
>>>>> Doug
>>>>>
>>>>>
>>>>> On 2016-08-18 05:12 PM, salsaman wrote:
>>>>>
>>>>> Hi all,
>>>>> I am pleased to announce the release of LiVES 2.6.7.
>>>>>
>>>>> ChangeLog
>>>>> -----------------
>>>>>
>>>>> Fix breakage in single image loader (regression).
>>>>> Alter icon location to comply with LSB.
>>>>> Fix for older libav.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> URLS:
>>>>>
>>>>> http://lives-video.com/releases/LiVES-2.6.7.tar.bz2
>>>>> (source bzip2, 3.7 MB)
>>>>>
>>>>> http://lives-video.com/releases/LiVES-2.6.7.tar.gz
>>>>> (source gzip, 5.1 MB)
>>>>>
>>>>>
>>>>> shasums:
>>>>>
>>>>>
>>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>>> Hash: SHA1
>>>>>
>>>>> sha1sums:
>>>>>
>>>>> ed1ab90aa8468ddb2f35e4f7ddf5009764ddc952  LiVES-2.6.7.tar.bz2
>>>>> 6e61f9775a3ffee59e3f5e712d76c24125c3ccea  LiVES-2.6.7.tar.gz
>>>>>
>>>>>
>>>>> sha256sums:
>>>>>
>>>>> 997535aa9124ea835d1b777b46dfb0978bc57c8363acf7413fa9389722605b20
>>>>>  LiVES-2.6.7.tar.bz2
>>>>> 4b0d543edff8a628b5636e02ab8f700952e3a20c780f1c0eba8281552b3d84cc
>>>>>  LiVES-2.6.7.tar.gz
>>>>> -----BEGIN PGP SIGNATURE-----
>>>>> Version: GnuPG v1
>>>>>
>>>>> iEYEARECAAYFAle2TAgACgkQ6nIyGQ+AtI1DJQCdEJm5ZoQi1hm3Rg4SAqbWw20Z
>>>>> 0CgAn0FYCVPmr0CJwKG7+GnwHfWPDKXI
>>>>> =hWOX
>>>>> -----END PGP SIGNATURE-----
>>>>>
>>>>>
>>>>> gpg key fingerprint can be found at
>>>>> http://lives-video.com/index.php?do=contact
>>>>>
>>>>>
>>>>> Enjoy !
>>>>> Gabriel.
>>>>>
>>>>>
>>>>> http://lives-video.com
>>>>> https://www.openhub.net/accounts/salsaman
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>>
>>>>> _______________________________________________
>>>>> Lives-users mailing 
>>>>> listLives-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/lives-users
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> _______________________________________________ Lives-users mailing
>>>>> list Lives-users@lists.sourceforge.net https://lists.sourceforge.net/
>>>>> lists/listinfo/lives-users
>>>>
>>>> ------------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Lives-users mailing 
>>>> listLives-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/lives-users
>>>>
>>>> ------------------------------------------------------------------------------
>>>> _______________________________________________ Lives-users mailing
>>>> list Lives-users@lists.sourceforge.net https://lists.sourceforge.net/
>>>> lists/listinfo/lives-users
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Lives-users mailing 
>>> listLives-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/lives-users
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________ Lives-users mailing
>>> list Lives-users@lists.sourceforge.net https://lists.sourceforge.net/
>>> lists/listinfo/lives-users
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Lives-users mailing 
>> listLives-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/lives-users
>>
>>
>> ------------------------------------------------------------
>> ------------------
>>
>> _______________________________________________
>> Lives-users mailing list
>> Lives-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/lives-users
>>
>>
>
------------------------------------------------------------------------------
_______________________________________________
Lives-users mailing list
Lives-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lives-users

Reply via email to