[vlc-devel] [PATCH] kate decoder: track and use basic formatting
Derk-Jan Hartman
hartman at videolan.org
Mon Jul 28 16:00:10 CEST 2008
On 28 jul 2008, at 11:14, ogg.k.ogg.k at googlemail.com wrote:
> this essentially fixes image based subtitles when the video was
> encoded
> at a lower resolution as the original.
>
> Thanks
> <0002-track-and-use-basic-formatting.patch>
+ if (p_sys->ki.original_canvas_width > 0) {
+ *w = p_sys->ki.original_canvas_width;
+ }
+ else {
+ *w = p_vout->fmt_in.i_width;
+ }
+ if (p_sys->ki.original_canvas_height > 0) {
+ *h = p_sys->ki.original_canvas_height;
+ }
+ else {
+ *h = p_vout->fmt_in.i_height;
+ }
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.
+ char *copy = (char*)malloc(ev->len0+strlen(prefix)+strlen(suffix));
+ strcpy(copy, prefix);
+ memcpy(copy+strlen(prefix), ev->text, len0)
is len0 the length of the string or of the data (ergo does it include
the \0) ?
I wanna make sure we malloc properly here.
And do we have kate samples anywhere ? I haven't been able to test
Kate on OSX yes.
DJ
More information about the vlc-devel
mailing list