Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-30 07:15:10 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-07-30 16:17:10 +0400
commitcbb2c95e47cd83cb65b2ce77cbb0296e85fa506b (patch)
treeb6561df8528ec04a8ceac25efee7ed0adb53543f /ffmpeg.c
parentdfd8f2ff195f3267bf266d96bc4b7cea4acf43a3 (diff)
ffmpeg: init simple filter graph before trying to extract framerate from its output.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index fc48e7c442..c2ea5bd894 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3078,6 +3078,17 @@ static int transcode_init(void)
ist->decoding_needed = 1;
ost->encoding_needed = 1;
+ if (!ost->filter &&
+ (codec->codec_type == AVMEDIA_TYPE_VIDEO ||
+ codec->codec_type == AVMEDIA_TYPE_AUDIO)) {
+ FilterGraph *fg;
+ fg = init_simple_filtergraph(ist, ost);
+ if (configure_filtergraph(fg)) {
+ av_log(NULL, AV_LOG_FATAL, "Error opening filters!\n");
+ exit(1);
+ }
+ }
+
if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
if (ost->filter && !ost->frame_rate.num)
ost->frame_rate = av_buffersink_get_frame_rate(ost->filter->filter);
@@ -3090,17 +3101,6 @@ static int transcode_init(void)
}
}
- if (!ost->filter &&
- (codec->codec_type == AVMEDIA_TYPE_VIDEO ||
- codec->codec_type == AVMEDIA_TYPE_AUDIO)) {
- FilterGraph *fg;
- fg = init_simple_filtergraph(ist, ost);
- if (configure_filtergraph(fg)) {
- av_log(NULL, AV_LOG_FATAL, "Error opening filters!\n");
- exit(1);
- }
- }
-
switch (codec->codec_type) {
case AVMEDIA_TYPE_AUDIO:
codec->sample_fmt = ost->filter->filter->inputs[0]->format;