/* $Id: encavcodec.c,v 1.23 2005/10/13 23:47:06 titer Exp $
This file is part of the HandBrake source code.
- Homepage: <http://handbrake.m0k.org/>.
+ Homepage: <http://handbrake.fr/>.
It may be used under the terms of the GNU General Public License. */
#include "hb.h"
-#include "ffmpeg/avcodec.h"
+#include "libavcodec/avcodec.h"
struct hb_work_private_s
{
void encavcodecClose( hb_work_object_t * );
hb_work_object_t hb_encavcodec =
-{
+{
WORK_ENCAVCODEC,
"MPEG-4 encoder (libavcodec)",
encavcodecInit,
encavcodecWork,
encavcodecClose
-};
+};
int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
{
AVCodec * codec;
AVCodecContext * context;
-
+
hb_work_private_t * pv = calloc( 1, sizeof( hb_work_private_t ) );
w->private_data = pv;
context->sample_aspect_ratio.num = job->pixel_aspect_width;
context->sample_aspect_ratio.den = job->pixel_aspect_height;
- hb_log( "encavcodec: encoding with stored aspect %d/%d",
+ hb_log( "encavcodec: encoding with stored aspect %d/%d",
job->pixel_aspect_width, job->pixel_aspect_height );
}
context->flags |= CODEC_FLAG_GRAY;
}
- if( job->pass )
+ if( job->pass != 0 && job->pass != -1 )
{
char filename[1024]; memset( filename, 0, 1024 );
hb_get_tempory_filename( job->h, filename, "ffmpeg.log" );
context->extradata_size );
#endif
}
-
+
return 0;
}