On 23/02/15 21:31, Federico Tomassetti wrote:
My goal was not to return a positive value in case of error but a positive
value in case the two parameters can be merged.
I wanted to do that because basically the functions ff_merge_formats, etc
are invoked to verify if the two formats are compatible. However if they
are compatible the intersection of the formats is allocated and it is
returned BUT the pointer is lost (so the memory leak).
Given we are using these functions as they were returning a boolean I
thought it could be worthy to return a boolean (I could not find any
boolean-ish type in libav so I used an int instead, using 0 for false and 1
for true).

Would be nicer to have a separate function doing this check (and returning a boolean).

lu

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to