Backport of "avviddec: Temporarily unlock stream lock while flushing buffers" into 1.22
Backport of !4610 (merged) "avviddec: Temporarily unlock stream lock while flushing buffers".
Commits:
- 186d8a99 avviddec: Temporarily unlock stream lock while flushing buffers