| View previous topic :: View next topic |
| Author |
Message |
Florian
Joined: 16 Apr 2005 Posts: 4
|
Posted: Sat Apr 16, 2005 11:17 pm Post subject: video encoder pointer bug? |
|
|
I get a null pointer for this code. Am I using it wrongly?
| Code: | import pymedia.video.vcodec as vcodec
buf = chr(0)*3*10*10
params = {'width' :10,
'height' :10,
'id' :vcodec.getCodecID( 'mpeg2video' ),
'frame_rate' :24,
'bitrate' :9800000}
encoder = vcodec.Encoder( params )
frame = vcodec.VFrame( vcodec.formats.PIX_FMT_RGB24,
(10,10), (buf,None,None) )
encoder.encode( frame ) |
Thanks a lot |
|
| Back to top |
|
 |
jbors Site Admin

Joined: 12 Nov 2004 Posts: 1675
|
Posted: Sun Apr 17, 2005 10:54 pm Post subject: |
|
|
Try to have width to be dividable by 16. Like 16, 32, 48 etc.
Cannot do any tests now. But will run something next week. |
|
| Back to top |
|
 |
Florian
Joined: 16 Apr 2005 Posts: 4
|
Posted: Mon Apr 18, 2005 5:21 am Post subject: |
|
|
| No offence intended, but test suites would be rather fitting to prevent bugs like this sneaking up on you and hitting when you've got no time to fix it. |
|
| Back to top |
|
 |
jbors Site Admin

Joined: 12 Nov 2004 Posts: 1675
|
Posted: Mon Apr 18, 2005 6:55 am Post subject: |
|
|
I agree. Any volunteers for the test suit ?  |
|
| Back to top |
|
 |
|