-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix transcoded media ends before file is complete #1372
Conversation
src/iohandler/process_io_handler.cc
Outdated
} else | ||
ret = 0; | ||
|
||
killAll(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure, we do not need this kind of cleanup. I am afraid of memory leaks or dead threads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked into it again. The transcoding process is always cleaned up eventually by calling ProcessIOHandler::close()
either by the BufferedIOHandler
class which holds the instance of ProcessIOHandler
, or from the destructor. But with this modification it is only cleaned up when we transferred all content to the client, until then the transcoding process is in zombie state. For how much time it depends on the buffer settings, but likely for 10-20-30 seconds. I'll push changes to prevent this shortly.
Otherwise looks good to me. |
Fixes #917 |
This breaks npupnp support. UPNP_USING_CHUNKED is not implemented. |
You're right. Should we restore the original value in case of
|
Can you provide a PR, please? |
@dyseg I posted an issue at npupnp upstream. If implemented, no. Although the minimum version should be updated. |
Maybe just adding ifndef UPNP_USING_CHUNKED is enough. |
Also removed ATTR_TRANSCODING_PROFILES_PROFLE_USECHUNKEDENC option, which wasn't used.