[vlc-devel] Re: Question about the function pf_vout_buffer_new( p_dec )

Derk-Jan Hartman hartman at videolan.org
Thu Feb 23 18:40:18 CET 2006


I'd start by looking into why you get this:
> -1264541472

as the id of your decoder in the debug message. Cause that means  
something else is quite wrong.

DJ


On 23-feb-2006, at 18:01, Sigmund Augdal Helberg wrote:

> On 2/23/06, Nelson Lam <nelson.lam at student.cityu.edu.hk> wrote:
>> Hello,
>>
>> I have init the parameters of the image. Because I am testing the  
>> code, so
>> some of the values are meaningless. Here is the init code:
>>     p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0');
>>     p_dec->fmt_out.video.i_visible_width =
>>     p_dec->fmt_out.video.i_width = NULL;
>>     p_dec->fmt_out.video.i_visible_height =
>>     p_dec->fmt_out.video.i_height = NULL;
>>     p_dec->fmt_out.video.i_aspect = p_dec->fmt_in.video.i_aspect;
>>     p_dec->fmt_out.video.i_frame_rate = 1;
>>     p_dec->fmt_out.video.i_frame_rate_base = 1;
>>     p_pic->b_progressive = 1;
>>     p_pic->b_top_field_first = 1;
>>     p_pic->i_nb_fields = 2;
>> And then I call
>>     p_pic = p_dec->pf_vout_buffer_new( p_dec );
>>     printf("%p",p_pic);
>>
>> However, printf shows that the p_pic is (nil). I tried to set the  
>> width and
>> height as 352 and 288. But there is an error message:
>>
>> [-1264541472] main decoder debug: no usable vout present, spawning  
>> one
>> floating point error
> Try looking at some of the other video codecs for some examples.
>
> from a quick peek at least the following things seems necessary:
>  vout_InitFormat( &p_dec->fmt_out.video, <chroma>, <width>,  
> <height>,<aspect>)
>     p_dec->fmt_out.i_cat = VIDEO_ES;
>     p_dec->fmt_out.i_codec = <chroma>;
>
> "floating point error" usually indicates a divition by zero, which I
> assume is because some value is unset.
>
> Hope this helps
>
> Sigmund
>>
>> Could anyone please help me to solve the problem?
>>
>> Much thanks,
>> Nelson
>>
>>
>>> ===== Original Message From Clément Stenac <zorglub at via.ecp.fr>  
>>> =====
>>> Hello,
>>>
>>> I suppose you did not correctly init the parameters of the image  
>>> (the
>>> p_dec->fmt_out.video stuff)
>>>
>>> Hope this helps,
>>>
>>> --
>>> Clément
>>>
>>> --
>>> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
>>> To unsubscribe, please read http://developers.videolan.org/ 
>>> lists.html
>>
>>
>> --
>> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
>> To unsubscribe, please read http://developers.videolan.org/lists.html
>>
>>
>
> --
> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://developers.videolan.org/lists.html
>
>

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list