# HG changeset patch # User rik # Date 1113482668 0 # Node ID d570dfbf9ef6fb8cca891f9f977673d5f0bacbb6 # Parent c9a7876a904671a210dd05b8de6e47f02ed465cb --Patch by Stefan '1stein' Schuermans <1stein@schuermans.info>: bugfix of the "grayscale" output scheme; the height and width of the movie were written als -1 and -1 into the resulting *.bml file diff -r c9a7876a9046 -r d570dfbf9ef6 libvo/vo_bl.c --- a/libvo/vo_bl.c Thu Apr 14 10:53:04 2005 +0000 +++ b/libvo/vo_bl.c Thu Apr 14 12:44:28 2005 +0000 @@ -68,6 +68,7 @@ typedef struct { char *name; /* filename */ FILE *fp; + int header_written; /* if header was written already */ } bl_file_t; typedef struct { @@ -125,18 +126,23 @@ mp_msg(MSGT_VO, MSGL_ERR, "bl: error opening %s\n", f->name); return 1; } - fprintf(f->fp, + f->header_written = 0; + return 0; +} + +static void bml_write_frame(bl_file_t *f, unsigned char *i, int duration) { + int j, k; + if( ! f->header_written ) + { + fprintf(f->fp, "\n" "\n" "
\n" " Movie autogenerated by MPlayer\n" " http://www.mplayerhq.hu\n" "
\n", bl->width, bl->height, bl->bpc, bl->channels); - return 0; -} - -static void bml_write_frame(bl_file_t *f, unsigned char *i, int duration) { - int j, k; + f->header_written = 1; + } fprintf(f->fp, " \n", duration); for (j = 0; j < bl->height; j++) { fprintf(f->fp, " ");