Closed jnettlet closed 9 months ago
Nice catch, thanks!
No problem. Thanks for the excellent plugin. Thanks for integrating the fix so quickly. I was actually planning on sending a pull request later.
Just one correct the function populate_devices() also needs this same fix.
Thanks, Jon
From: Florian Zwoch @.> Sent: Monday, November 13, 2023 3:25 PM To: fzwoch/obs-vaapi @.> Cc: Jon Nettleton @.>; Author @.> Subject: Re: [fzwoch/obs-vaapi] Getting a segfault form libpci (Issue #21)
Nice catch, thanks!
— Reply to this email directly, view it on GitHubhttps://github.com/fzwoch/obs-vaapi/issues/21#issuecomment-1808263580, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AINUS3EHKE6PE7X4WBFXOBTYEIUWLAVCNFSM6AAAAAA7IRSMC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBYGI3DGNJYGA. You are receiving this because you authored the thread.Message ID: @.***>
Ugh, didn't realize I had it twice because of the legacy encoders. Fixed!
I believe you sscanf matching implementation in get_device_name and populate_devices is slightly incorrect. Your format specifier matches everything up to the - character which leaves the separator as part of the domain integer. If the domain is zero this is most likely irrelevant since -0 should be overlooked. However for my configuration this was making the domain -4 which is obviously invalid. Instead I have changed the code as following to get things up and working.