[MPlayer-dev-eng] [BUG] v4l driver buffer

Jindrich Makovicka makovick at kmlinux.fjfi.cvut.cz
Thu Dec 5 13:06:25 CET 2002


Gabucino wrote:

>MEncoder's v4l driver assigns half the physical mem to A/V buffer. My question
>is why not assign half the FREE mem, or increase dynamically? In current case
>situations like this can occur:
>
>Selected device: BT878(Hauppauge (bt878))
> Capabilites: capture tuner overlay clipping frameram scales 
> Device type: 235
> Supported sizes: 48x32 => 924x576
> Inputs: 4
>  0: Television: tuner audio tv camera  (tuner:1, norm:pal)
>  1: Composite1: audio camera  (tuner:0, norm:pal)
>  2: S-Video: audio camera  (tuner:0, norm:pal)
>  3: Composite3: audio camera  (tuner:0, norm:pal)
>Using input 'Television'
>cannot allocate video buffer: Cannot allocate memory
>Cannot open demuxer
>Exiting...
>--(gabucino at woodstock)-(75/pts)-(Gabucino rulez!)--
>--($:~/x)-- free
>             total       used       free     shared    buffers     cached
>Mem:        191512     183612       7900          0      21320      53880
>-/+ buffers/cache:     108412      83100
>Swap:            0          0          0
>
>This is dangerous in situations when the box is alone and records from crontab.
>Then some memleak occurs (also in my case, XFree's MGA driver sucks), and
>all is over.
>
>  
>
Please test the attachment. It makes tvi_v4l allocate the buffers on the 
fly but I am still not 100% sure the code is race-free.

Regards,

-- 
Jindrich Makovicka

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tvi_v4l.c.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20021205/45941784/attachment.txt>


More information about the MPlayer-dev-eng mailing list