[DVDnav-discuss] Please add dvdnav_dup() and dvdnav_free_dup() functions from the handbrake project

John Stebbins stebbins at jetheaddev.com
Thu May 24 23:15:22 CEST 2012


On 05/24/2012 10:25 PM, Erik Hovland wrote:
>> I tested your git.  Works great.
> Very good! I am glad I didn't screw anything up.
>
>> I also compared your git to my patchset.
>> You have merged them all with the exception of part of one patch.
>>   Unfortunately, I now can not remember the circumstances under which this
>> small patch was useful.  I have a vague recollection that it was a rare
>> corner case that I stumbled over, but it's been so long I really don't know.
>>   I'm attaching the patch if you have any interest in it. It was originally
>> part of the patch to fix vm_reset problem.
> My only issue w/ the patch is that it isn't clear why we would need to
> change the VOB if the this->file is null. Especially confusing is the snippet
> of code inside the conditional block:
> if(this->file) {
>    DVDCloseFile(this->file);
>    this->file = NULL;
> }
>
> It implies that this->file being null is not a big deal. I am going to
> leave this
> patch out for now.
>
> E
>

The problem isn't with what happens when this->file is null *inside* the 
conditional.  It's a problem with what happens if the conditional *is 
not* run and this->file is null.  The file does not get opened and 
DVDReadBlocks references a null pointer.



More information about the DVDnav-discuss mailing list