Revision 4568325a ffmpeg.c

View differences:

ffmpeg.c
166 166

  
167 167
static int64_t recording_time = 0;
168 168
static int64_t start_time = 0;
169
static int64_t rec_timestamp = 0;
169 170
static int file_overwrite = 0;
170 171
static char *str_title = NULL;
171 172
static char *str_author = NULL;
......
2213 2214
    start_time = parse_date(arg, 1);
2214 2215
}
2215 2216

  
2217
static void opt_rec_timestamp(const char *arg)
2218
{
2219
    rec_timestamp = parse_date(arg, 0) / 1000000;
2220
}
2221

  
2216 2222
static void opt_input_file(const char *filename)
2217 2223
{
2218 2224
    AVFormatContext *ic;
......
2658 2664
            exit(1);
2659 2665
        }
2660 2666

  
2661
        if (str_title)
2667
        oc->timestamp = rec_timestamp;
2668
	    
2669
	if (str_title)
2662 2670
            pstrcpy(oc->title, sizeof(oc->title), str_title);
2663 2671
        if (str_author)
2664 2672
            pstrcpy(oc->author, sizeof(oc->author), str_author);
......
3127 3135
    { "t", HAS_ARG, {(void*)opt_recording_time}, "set the recording time", "duration" },
3128 3136
    { "ss", HAS_ARG, {(void*)opt_start_time}, "set the start time offset", "time_off" },
3129 3137
    { "title", HAS_ARG | OPT_STRING, {(void*)&str_title}, "set the title", "string" },
3138
    { "timestamp", HAS_ARG, {(void*)&opt_rec_timestamp}, "set the timestamp", "time" },
3130 3139
    { "author", HAS_ARG | OPT_STRING, {(void*)&str_author}, "set the author", "string" },
3131 3140
    { "copyright", HAS_ARG | OPT_STRING, {(void*)&str_copyright}, "set the copyright", "string" },
3132 3141
    { "comment", HAS_ARG | OPT_STRING, {(void*)&str_comment}, "set the comment", "string" },

Also available in: Unified diff