Opened 14 years ago

Closed 14 years ago

#393 closed defect (wontfix)

Memory leak in mythtranscode

Reported by: kc0abd@… Owned by: Isaac Richards
Priority: major Milestone: unknown
Component: mythtv Version:
Severity: medium Keywords:
Cc: Ticket locked: no

Description

mythtranscode memory usage continue to grow untill it reaches 2 gbytes when the following commands are used:

mythtranscode --chanid 1007 --starttime 2005-09-21T20:00:00 --profile autodetect --fifodir . --showprogress --verbose all > transcode.log &

ffmpeg -f u16le -ar 2 -i audout -f rawvideo -s 640x480 -r 29.97 -i vidout -vcodec mpeg4 -b 2000 -acodec mp3 -ab 128 out.avi

the transcode.log file contains the following:

2005-09-28 09:13:23.203 allocating additonal buffer for : audio(23126) 2005-09-28 09:13:23.208 allocating additonal buffer for : audio(23127) 2005-09-28 09:13:23.228 allocating additonal buffer for : audio(23128) 2005-09-28 09:13:23.378 allocating additonal buffer for : audio(23129) 2005-09-28 09:13:23.524 allocating additonal buffer for : audio(23130) 2005-09-28 09:13:23.530 allocating additonal buffer for : audio(23131) 2005-09-28 09:13:23.549 allocating additonal buffer for : audio(23132) 2005-09-28 09:13:23.592 Processed: 103563 of 107790 frames(3455 seconds) 2005-09-28 09:13:23.593 Video timecode = 103560 2005-09-28 09:13:23.712 allocating additonal buffer for : audio(23133) 2005-09-28 09:13:23.730 allocating additonal buffer for : audio(23134) 2005-09-28 09:13:23.736 allocating additonal buffer for : audio(23135) 2005-09-28 09:13:23.911 allocating additonal buffer for : audio(23136) 2005-09-28 09:13:24.066 allocating additonal buffer for : audio(23137) 2005-09-28 09:13:24.072 allocating additonal buffer for : audio(23138) 2005-09-28 09:13:24.090 Video timecode = 103590 2005-09-28 09:13:24.095 allocating additonal buffer for : audio(23139) 2005-09-28 09:13:24.227 allocating additonal buffer for : audio(23140) 2005-09-28 09:13:24.250 allocating additonal buffer for : audio(23141) 2005-09-28 09:13:24.397 allocating additonal buffer for : audio(23142) 2005-09-28 09:13:24.403 allocating additonal buffer for : audio(23143) 2005-09-28 09:13:24.422 allocating additonal buffer for : audio(23144) 2005-09-28 09:13:24.571 allocating additonal buffer for : audio(23145) 2005-09-28 09:13:24.589 Video timecode = 103620 2005-09-28 09:13:24.702 allocating additonal buffer for : audio(23146) 2005-09-28 09:13:24.723 allocating additonal buffer for : audio(23147) 2005-09-28 09:13:24.729 allocating additonal buffer for : audio(23148) 2005-09-28 09:13:24.883 allocating additonal buffer for : audio(23149) 2005-09-28 09:13:25.077 allocating additonal buffer for : audio(23150) 2005-09-28 09:13:25.083 allocating additonal buffer for : audio(23151) 2005-09-28 09:13:25.103 Video timecode = 103650 2005-09-28 09:13:25.109 allocating additonal buffer for : audio(23152) 2005-09-28 09:13:25.282 allocating additonal buffer for : audio(23153) 2005-09-28 09:13:25.303 allocating additonal buffer for : audio(23154) abort

I have traced the memory leak to the following:

fifowrite.cpp

FIFOWrite::FIFOWrite

allocate memory in the following and is not being released

if (blocking) {

struct fifo_buf *tmpfifo; tmpfifo = fb_inptr[id]->next; fb_inptr[id]->next = new struct fifo_buf; fb_inptr[id]->next->data = new unsigned char[maxblksize[id]]; fb_inptr[id]->next->next = tmpfifo; QString msg = QString("allocating additonal buffer for : %1(%2)")

.arg(fbdesc[id]).arg(++fbcount[id]);

VERBOSE(VB_FILE, msg);

}

Change History (1)

comment:1 Changed 14 years ago by Isaac Richards

Resolution: wontfix
Status: newclosed

This looks like a problem with ffmpeg not reading data from the audio fifo, not a bug in myth.

Note: See TracTickets for help on using tickets.