#vulnerable code 
                                public static VideoInfo getVideoInfo(File input) {
        if (input != null && input.exists()) {
            List<String> commands = Lists.newArrayList(BaseCommandOption.getFFprobeBinary());
            commands.add(input.getAbsolutePath());
//            if (log.isInfoEnabled())
//                log.info("get video info commands : '{}'", FFmpegUtils.ffmpegCmdLine(commands));
            try {
//                pb = new ProcessBuilder();
//                pb.command(commands);
//
//                pb.redirectErrorStream(true);
//
//
//                pro = pb.start();
//                BufferedReader buf = null;
//                buf = new BufferedReader(new InputStreamReader(pro.getInputStream()));
//                StringBuffer sb = new StringBuffer();
//                String line = null;
//                while ((line = buf.readLine()) != null) {
//                    sb.append(line);
//                    continue;
//                }
//
//                int ret = pro.waitFor();
//                if (log.isInfoEnabled())
//                    log.info("get video info process run status:'{}'", ret);

                VideoInfo mi = FFmpegUtils.regInfo(runProcess(commands, null));
                mi.setSize(new FileInputStream(input).available());
                return mi;
            } catch (IOException e) {
                if (log.isErrorEnabled())
                    log.error("video '{}' get info IOException :'{} '", input.getAbsoluteFile(), e.getCause().getMessage());
                e.printStackTrace();
            } catch (InterruptedException e) {
                if (log.isErrorEnabled())
                    log.error("video '{}' get info InterruptedException :'{} '", input.getAbsoluteFile(), e.getCause().getMessage());
                e.printStackTrace();
            } catch (Exception e) {
                if (log.isErrorEnabled())
                    log.error("video '{}' get info Exception :'{} '", input.getAbsoluteFile(), e.getCause().getMessage());
                e.printStackTrace();
            }
        } else {
            if (log.isErrorEnabled())
                log.error("video '{}' is not fount! ", input.getAbsolutePath());
        }

        return null;
    } 
                            #location 29 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                public static VideoInfo getVideoInfo(File input) {
        if (input != null && input.exists()) {

            List<String> commands = Lists.newArrayList(BaseCommandOption.getFFprobeBinary());
            commands.add(input.getAbsolutePath());
//            if (log.isInfoEnabled())
//                log.info("get video info commands : '{}'", FFmpegUtils.ffmpegCmdLine(commands));
            try {
                VideoInfo vi = new VideoInfo(new FileInputStream(input).available());
//                pb = new ProcessBuilder();
//                pb.command(commands);
//
//                pb.redirectErrorStream(true);
//
//
//                pro = pb.start();
//                BufferedReader buf = null;
//                buf = new BufferedReader(new InputStreamReader(pro.getInputStream()));
//                StringBuffer sb = new StringBuffer();
//                String line = null;
//                while ((line = buf.readLine()) != null) {
//                    sb.append(line);
//                    continue;
//                }
//
//                int ret = pro.waitFor();
//                if (log.isInfoEnabled())
//                    log.info("get video info process run status:'{}'", ret);
                FFmpegUtils.regInfo(runProcess(commands, null), vi);
                return vi;
            } catch (IOException e) {
                if (log.isErrorEnabled())
                    log.error("video '{}' get info IOException :'{} '", input.getAbsoluteFile(), e.getCause().getMessage());
                e.printStackTrace();
            } catch (InterruptedException e) {
                if (log.isErrorEnabled())
                    log.error("video '{}' get info InterruptedException :'{} '", input.getAbsoluteFile(), e.getCause().getMessage());
                e.printStackTrace();
            } catch (Exception e) {
                if (log.isErrorEnabled())
                    log.error("video '{}' get info Exception :'{} '", input.getAbsoluteFile(), e.getCause().getMessage());
                e.printStackTrace();
            }
        } else {
            if (log.isErrorEnabled())
                log.error("video '{}' is not fount! ", input.getAbsolutePath());
        }

        return null;
    }