Modify

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

myth.log (33.0 KB) - added by Robin Gilks <g8ecj@…> 4 years ago.
playback log
gdb.txt (8.2 KB) - added by Robin Gilks <g8ecj@…> 4 years ago.
gdb.txt

Change History

Changed 4 years ago by Robin Gilks <g8ecj@…>

playback log

Changed 4 years ago by Robin Gilks <g8ecj@…>

gdb.txt

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

(In [15756]) Refs #4577. When testing for the DVB Radio segfault reported in #4577, I was getting some buffer overruns. This simply underfills the buffer a bit, there is still plenty of audio data to prevent stuttering.

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.

comment:5 Changed 4 years ago by danielk

  • Status changed from assigned to closed
  • Resolution set to fixed

Whoops [15757] should have read Fixes #4577, not Refs #4477...

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.