Ticket #4577 (closed defect: fixed)
Opened 4 years ago
Last modified 4 years ago
Segfault playing DVB Radio recording
| Reported by: | Robin Gilks <g8ecj@…> | Owned by: | danielk |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.21 |
| Component: | mythtv | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
A 5 minute DVB-S radio recording (to get the long range weather forecast!) causes a segfault when played. The complete file (30M) can be downloaded from http://gilks.ath.cx/~g8ecj/dvb-radio.mpg
Using r15728 on x86
Playback log and backtrace attached.
Attachments
Change History
comment:1 Changed 4 years ago by dm@…
I just noticed this while I was testing something else. When I looked at this it seemed that the value of the size of the buffer pointed to by frame->buf was smaller than frame->size so memcpy gave a segfault when it tried to write to the buffer. I tried using frame->width*frame->height*frame->bpp/8 as the size and that gave me a value that worked. I couldn't see where the buffer was allocated or what its correct size should be.
David.
comment:2 Changed 4 years ago by danielk
- Owner changed from ijr to danielk
- Status changed from new to assigned
- Milestone changed from unknown to 0.21
comment:3 Changed 4 years ago by danielk
comment:4 Changed 4 years ago by danielk
(In [15757]) Refs #4577. Safely copies video frame for DVB radio.
The plain memcpy we were using only works if the Y U & V planes are all stored in one contiguous buffer. With drivers like the VIA drivers, which can be configured to use separate DMA buffers for the planes, this will lead to a segfault.

playback log