summaryrefslogtreecommitdiffstats
path: root/mencoder.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-08 12:21:23 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-08 12:21:23 +0000
commit290742a2be87003d772f5eab4c3a23e757754212 (patch)
tree94c0c88859b4398649a703d5430d7c45dd3e885a /mencoder.c
parentc9f1d1c502df9eb550b0ee8485260fcfc52dd875 (diff)
downloadmpv-290742a2be87003d772f5eab4c3a23e757754212.tar.bz2
mpv-290742a2be87003d772f5eab4c3a23e757754212.tar.xz
fixed framecopy
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3385 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mencoder.c')
-rw-r--r--mencoder.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/mencoder.c b/mencoder.c
index 75aca56a71..d7fac4d8a1 100644
--- a/mencoder.c
+++ b/mencoder.c
@@ -1,4 +1,4 @@
-
+#define VCODEC_COPY 0
#define VCODEC_FRAMENO 1
#define VCODEC_DIVX4 2
@@ -503,8 +503,24 @@ mux_v->h.dwRate=mux_v->h.dwScale*(force_ofps?force_ofps:sh_video->fps);
mux_v->codec=out_video_codec;
switch(mux_v->codec){
-case 0:
- mux_v->bih=sh_video->bih;
+case VCODEC_COPY:
+ printf("sh_video->bih: %x\n", sh_video->bih);
+ if (sh_video->bih)
+ mux_v->bih=sh_video->bih;
+ else
+ {
+ mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
+ mux_v->bih->biSize=sizeof(BITMAPINFOHEADER);
+ mux_v->bih->biWidth=sh_video->disp_w;
+ mux_v->bih->biHeight=sh_video->disp_h;
+ mux_v->bih->biCompression=sh_video->format;
+ mux_v->bih->biPlanes=1;
+ mux_v->bih->biBitCount=24; // FIXME!!!
+ mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
+ }
+ printf("videocodec: framecopy (%dx%d %dbpp fourcc=%x)\n",
+ mux_v->bih->biWidth, mux_v->bih->biHeight,
+ mux_v->bih->biBitCount, mux_v->bih->biCompression);
break;
case VCODEC_FRAMENO:
mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
@@ -591,7 +607,7 @@ printf("Writing AVI header...\n");
aviwrite_write_header(muxer,muxer_f);
switch(mux_v->codec){
-case 0:
+case VCODEC_COPY:
break;
case VCODEC_FRAMENO:
decoded_frameno=0;
@@ -792,7 +808,7 @@ if( (v_pts_corr>=(float)mux_v->h.dwScale/mux_v->h.dwRate && skip_flag<0)
switch(mux_v->codec){
-case 0:
+case VCODEC_COPY:
mux_v->buffer=start;
if(skip_flag<=0) aviwrite_write_chunk(muxer,mux_v,muxer_f,in_size,(sh_video->ds->flags&1)?0x10:0);
break;