Closed Cryspia closed 9 years ago
It's a good practice to describe what the problem was and why the fix works. This is especially important in open source projects, and even more so for open source projects with voluntary maintainers because they have less time to spend on the project. The less work the maintainers have to do to understand your fix, the likelier it is to be accepted. For example, I shouldn't have to read the code changes to get an overview of what the problem/fix was (of course I'll still look at the code to review it, but I should know before looking at the code what the problem/fix was so I can evaluate it better during review).
In this case the fix was very simple, but to get you into the habit of describing your patches I'll only merge this once you add that info :wink:
@dideler Should I add the reason in the commit log or just reply here?
You should add the explanation to both the description of this PR AND the commit log.
Since I'll be away this week, can someone else please merge this once @Promm adds the explanation?
@dideler Commit log and PR description changed.
Thanks Kaiyuan!
Now the user can load and unload video/audio input sources and record without closing the program.
This bug was caused because the flag variables self.record_audio and self.record_video are not cleared after a cycle of recording ends. So the program will try to unload the source even it has been unchecked. This fix reset the variables by the end of recording so it will not influence the next one.