[DVDnav-discuss] dvdnav patches from handbrake project

John Stebbins stebbins at jetheaddev.com
Sat May 29 22:53:03 CEST 2010


On 05/29/2010 01:04 PM, John Stebbins wrote:
> On 05/29/2010 10:47 AM, Erik Hovland wrote:
>   
>> * nav-dup-handle.patch
>>     
>>> This patch allows you safely to create a duplicate of a dvdnav_t.  This
>>> handle can be used in parallel with the handle it is duplicated from.
>>> HandBrake uses this to perform a recursive search of dvd menus in order
>>> to find the main feature of a disc.
>>>     
>>>       
>> At the least this looks like it should be split into two. The first being the
>> vm_stop and vm_close functions the second being the dup functions.
>>   
>>     
> Yes, you are right.  I didn't notice that there were 2 separate things
> going on here.  The vm changes are to handle the case where the vm
> enters the stop state while playing a disc.  This can happen for
> multiple reasons.  Before the patch, the only way to get out of the stop
> state was to close dvdnav and re-open it.  I will split these and update
> the patches.
>
>   
Updated. Removed vm changes. Added this->file == NULL test to
dvdnav_get_next_cache_block.

Created new patch
* nav-allow-restart.patch
Allow dvdnav to be restarted after a the vm has entered the stop state
for any reason.

>>   
>>     
>>> * nav-reset-deadlock.patch
>>> dvdnav_reset takes a lock, then latter calls dvdnav_clear which tries to
>>> take
>>> the lock again. dead. the unlock that is immediately after dvdnav_clear
>>> should be moved to before it.
>>>     
>>>       
>> Fine, but what about the conditional change. Is it part of the fix or
>> does it deal
>> w/ something else. If it deals w/ something else, please separate.
>>
>>   
>>     
> Hmm, I probably could have done this better.  dvdnav_reset doesn't clear
> this->current_position, but it does clear this->file.  I could have
> alternately added code to dvdnav_clear to clear current_position. 
>
> The file test is also needed by the nav-dup-handle.patch. It sets file =
> NULL and deliberately doesn't clear dvdnav_t.  Setting file to NULL
> forces re-opening it at the next dvdnav_get_next_cache_block.
>
> I'll update this patch as well to put the parts where they belong.
>
>   
Updated. Clear position_current in dvdnav_clear. Remove this->file test
from dvdnav_get_next_cache_block.

I also fixed a warning the could have lead to a problem in
nav-forward-seek.patch.

Note: I had to clear my browser cache before it would show me the
updated versions of these patches.



More information about the DVDnav-discuss mailing list