OSDN Git Service

First attempt at variable frame rate detelecining for NTSC video sources.
[handbrake-jp/handbrake-jp-git.git] / libhb / encavcodec.c
index 701caf9..85aa608 100644 (file)
@@ -87,7 +87,7 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
         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" );
@@ -195,7 +195,7 @@ int encavcodecWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
                                       frame );
     buf->start = in->start;
     buf->stop  = in->stop;
-    buf->key   = pv->context->coded_frame->key_frame;
+    buf->frametype   = pv->context->coded_frame->key_frame ? HB_FRAME_KEY : HB_FRAME_REF;
 
     av_free( frame );