aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-08-13 07:55:04 +0200
committerAnton Khirnov <anton@khirnov.net>2011-08-16 06:21:25 +0200
commitf233cfed7ba1ed044155c06d4bfacc7f9f10521f (patch)
treeb3a3831fed6aa22073bcf4c196ad4f1609c1f655
parent64db1a82d663958593f66ff7bf351d6a670e51a4 (diff)
downloadffmpeg-f233cfed7ba1ed044155c06d4bfacc7f9f10521f.tar.gz
avconv: cosmetics -- move parse_forced_key_frames().
parse_forced_key_frames() is only used in new_video_stream(), so move it right above new_video_stream().
-rw-r--r--avconv.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/avconv.c b/avconv.c
index 16d6514bd4..7e9bf7fcd4 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1965,29 +1965,6 @@ static int copy_chapters(int infile, int outfile)
return 0;
}
-static void parse_forced_key_frames(char *kf, OutputStream *ost,
- AVCodecContext *avctx)
-{
- char *p;
- int n = 1, i;
- int64_t t;
-
- for (p = kf; *p; p++)
- if (*p == ',')
- n++;
- ost->forced_kf_count = n;
- ost->forced_kf_pts = av_malloc(sizeof(*ost->forced_kf_pts) * n);
- if (!ost->forced_kf_pts) {
- av_log(NULL, AV_LOG_FATAL, "Could not allocate forced key frames array.\n");
- exit_program(1);
- }
- for (i = 0; i < n; i++) {
- p = i ? strchr(p, ',') + 1 : kf;
- t = parse_time_or_die("force_key_frames", p, 1);
- ost->forced_kf_pts[i] = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base);
- }
-}
-
/*
* The following code is the main loop of the file converter
*/
@@ -3191,6 +3168,29 @@ static int opt_input_file(const char *opt, const char *filename)
return 0;
}
+static void parse_forced_key_frames(char *kf, OutputStream *ost,
+ AVCodecContext *avctx)
+{
+ char *p;
+ int n = 1, i;
+ int64_t t;
+
+ for (p = kf; *p; p++)
+ if (*p == ',')
+ n++;
+ ost->forced_kf_count = n;
+ ost->forced_kf_pts = av_malloc(sizeof(*ost->forced_kf_pts) * n);
+ if (!ost->forced_kf_pts) {
+ av_log(NULL, AV_LOG_FATAL, "Could not allocate forced key frames array.\n");
+ exit_program(1);
+ }
+ for (i = 0; i < n; i++) {
+ p = i ? strchr(p, ',') + 1 : kf;
+ t = parse_time_or_die("force_key_frames", p, 1);
+ ost->forced_kf_pts[i] = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base);
+ }
+}
+
static OutputStream *new_video_stream(AVFormatContext *oc, int file_idx)
{
AVStream *st;