[vlc-devel] [PATCH] kate decoder: track and use basic formatting
Derk-Jan Hartman
hartman at videolan.org
Tue Jul 29 15:06:24 CEST 2008
On 28 jul 2008, at 16:40, ogg.k.ogg.k at googlemail.com wrote:
>> What if only p_sys->ki.original_canvas_width is known. That might
>> result in some very weird w:h ratio's if you blindly take p_vout-
>>> fmt_in.i_height; I think that should be handled with a bit more
>>> care.
>
> Yes, but this would be quite unusual, though possible. Any other way
> to handle this would probably be not what was intended either. I'd be
> inclined to leave this as is, as it's what the stream intends,
> technically,
> Unless you have another suggestion.
In my opinion such a freedom in a format is bound to create problems
as soon as multiple tools start implementing it.
I would suggest:
if( p_sys->ki.original_canvas_width > 0 && p_sys-
>ki.original_canvas_height > 0 ) {
*w = p_sys->ki.original_canvas_width;
*h = p_sys->ki.original_canvas_height;
} else {
*w = p_vout->fmt_in.i_width;
*h = p_vout->fmt_in.i_height;
}
And I would make sure that the spec is clear on such a thing as well.
DJ
More information about the vlc-devel
mailing list