[MPlayer-cvslog] CVS: main/libvo vo_bl.c,1.8,1.9
Rik Snel CVS
syncmail at mplayerhq.hu
Thu Apr 14 14:44:30 CEST 2005
CVS change done by Rik Snel CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv27945
Modified Files:
vo_bl.c
Log Message:
--Patch by Stefan '1stein' Schuermans <1stein at 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
Index: vo_bl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_bl.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- vo_bl.c 28 Oct 2004 01:15:52 -0000 1.8
+++ vo_bl.c 14 Apr 2005 12:44:28 -0000 1.9
@@ -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,
"<?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>");
More information about the MPlayer-cvslog
mailing list