X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=libhb%2Fencxvid.c;h=18961dc28eed3f28a13f2934d6674bb36e85c570;hb=533776bbad20db93fe964bc69975f108b2a30888;hp=e09464d925b16600e21aefd6666742fa84d78bed;hpb=90fba27222b3467b91c29803f217c4d5335c7ad0;p=handbrake-jp%2Fhandbrake-jp-git.git
diff --git a/libhb/encxvid.c b/libhb/encxvid.c
index e09464d9..18961dc2 100644
--- a/libhb/encxvid.c
+++ b/libhb/encxvid.c
@@ -1,7 +1,7 @@
/* $Id: encxvid.c,v 1.10 2005/03/09 23:28:39 titer Exp $
This file is part of the HandBrake source code.
- Homepage: .
+ Homepage: .
It may be used under the terms of the GNU General Public License. */
#include "hb.h"
@@ -128,7 +128,7 @@ void encxvidClose( hb_work_object_t * w )
if( pv->xvid )
{
- hb_log( "encxvid: closing libxvidcore" );
+ hb_deep_log( 2, "encxvid: closing libxvidcore" );
xvid_encore( pv->xvid, XVID_ENC_DESTROY, NULL, NULL);
}
@@ -149,10 +149,11 @@ int encxvidWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
xvid_enc_frame_t frame;
hb_buffer_t * in = *buf_in, * buf;
- /* If this is the last empty frame, we're done */
- if(!in->data)
+ if ( in->size <= 0 )
{
- *buf_out = NULL;
+ /* EOF on input - send it downstream & say we're done */
+ *buf_out = in;
+ *buf_in = NULL;
return HB_WORK_DONE;
}
@@ -160,7 +161,6 @@ int encxvidWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
buf = hb_buffer_init( 3 * job->width * job->height / 2 );
buf->start = in->start;
buf->stop = in->stop;
- //buf->chap = in->chap;
memset( &frame, 0, sizeof( frame ) );
@@ -220,7 +220,7 @@ int encxvidWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
}
}
- hb_log( "encxvid: VOL size is %d bytes", vop_start - vol_start );
+ hb_deep_log( 2, "encxvid: VOL size is %d bytes", vop_start - vol_start );
job->config.mpeg4.length = vop_start - vol_start;
memcpy( job->config.mpeg4.bytes, &buf->data[vol_start],
job->config.mpeg4.length );