Intel-Media-SDK / MediaSDK

The Intel® Media SDK
MIT License
926 stars 457 forks source link

invalid fd close cause issues when application already open the fd 0, in VA-surface transfer. #2983

Closed monstercy closed 2 years ago

monstercy commented 2 years ago

System information

Issue behavior

Describe the current behavior

in file https://github.com/Intel-Media-SDK/MediaSDK/blob/51ffdf59f281a8604f6f10cf3775cf276ff1d30d/samples/sample_common/src/vaapi_utils.cpp#L454 it will close fd "close(ctx->fd);" which has not been assign value. most of times the ctx->fd is 0, it will cause trouble, if appellation already open fd 0 for other purpose.

Describe the expected behavior

files with fd as 0 will be closed.

Debug information