--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


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15159 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rik 2005-04-14 12:44:28 +00:00
parent 3a2bc40e86
commit d20d486f74
1 changed files with 12 additions and 6 deletions

View File

@ -68,6 +68,7 @@ static int prevpts = -1;
typedef struct {
char *name; /* filename */
FILE *fp;
int header_written; /* if header was written already */
} bl_file_t;
typedef struct {
@ -125,18 +126,23 @@ static int bml_init(bl_file_t *f) {
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,
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<blm width=\"%d\" height=\"%d\" bits=\"%d\" channels=\"%d\">\n"
" <header>\n"
" <title>Movie autogenerated by MPlayer</title>\n"
" <url>http://www.mplayerhq.hu</url>\n"
" </header>\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, " <frame duration=\"%d\">\n", duration);
for (j = 0; j < bl->height; j++) {
fprintf(f->fp, " <row>");