Opened 18 years ago
Closed 18 years ago
#1543 closed patch (fixed)
avcodec race between live preview and playback causes mythfrontend hang
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | 0.20 |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
There is a race between closing the live preview's codec and opening main playback's codec that can result in this error:
"[mpeg2video @ 0xb741b840]insufficient thread locking around avcodec_open/close()",
followed by a bunch of:
"[mpeg2video @ 0xb741b840]get_buffer() failed (stride changed)
2006-03-15 14:34:25.135 AFD Error: Unknown decoding error"
and finally a black screen and unresponsive frontend. It turns out that for certain streams av_find_stream_info() will eventually call avcodec_open() so it must be guarded by the avcodeclock. These patches accomplish that and fix the problem. I went hunting for other unsafe uses of avcodec_open/close (including indirect ones like av_find_stream_info()) and I found a couple more in NuppleVideoRecorder?. The patches also fix those, but I have no way of testing them.
Attachments (2)
Change History (5)
Changed 18 years ago by
Attachment: | fixes_9401.diff added |
---|
comment:1 Changed 18 years ago by
Milestone: | → 0.20 |
---|---|
Owner: | changed from Isaac Richards to danielk |
Status: | new → assigned |
Version: | → head |
svn diffs for fixes branch, taken from r9401