input_sync = 1;
int main(int argc, char **argv){    int i;    int64_t ti;    av_register_all();    if (argc <= 1)        show_help();        /* parse options */    parse_options(argc, argv, options);    /* file converter / grab */    if (nb_output_files <= 0) {        fprintf(stderr, "Must supply at least one output file\n");        exit(1);    }        if (nb_input_files == 0) {        prepare_grab();    }    ti = getutime();    av_encode(output_files, nb_output_files, input_files, nb_input_files,               stream_maps, nb_stream_maps);    ti = getutime() - ti;    if (do_benchmark) {        printf("bench: utime=%0.3fs\n", ti / 1000000.0);    }    /* close files */    for(i=0;i<nb_output_files;i++) {        /* maybe av_close_output_file ??? */        AVFormatContext *s = output_files[i];	int j;        if (!(s->oformat->flags & AVFMT_NOFILE))	    url_fclose(&s->pb);	for(j=0;j<s->nb_streams;j++)	    av_free(s->streams[j]);        av_free(s);    }    for(i=0;i<nb_input_files;i++)        av_close_input_file(input_files[i]);    av_free_static();    if(intra_matrix)        av_free(intra_matrix);    if(inter_matrix)        av_free(inter_matrix);    #ifdef POWERPC_PERFORMANCE_REPORT    extern void powerpc_display_perf_report(void);    powerpc_display_perf_report();#endif /* POWERPC_PERFORMANCE_REPORT */#ifndef CONFIG_WIN32    if (received_sigterm) {        fprintf(stderr,            "Received signal %d: terminating.\n",            (int) received_sigterm);        exit (255);    }#endif    exit(0); /* not all OS-es handle main() return value */    return 0;}