InDashPC.org Forum Index InDashPC.org
In Dash Car PC forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

video encoder pointer bug?

 
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software
View previous topic :: View next topic  
Author Message
Florian



Joined: 16 Apr 2005
Posts: 4

PostPosted: Sat Apr 16, 2005 11:17 pm    Post subject: video encoder pointer bug? Reply with quote

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
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Sun Apr 17, 2005 10:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
Florian



Joined: 16 Apr 2005
Posts: 4

PostPosted: Mon Apr 18, 2005 5:21 am    Post subject: Reply with quote

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
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Mon Apr 18, 2005 6:55 am    Post subject: Reply with quote

I agree. Any volunteers for the test suit ? Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group