[FFmpeg-devel] [PATCH] Fix auto-scaling, use a numeric values for the sws_flags set in the graph rather than "bilinear".
Stefano Sabatini
stefano.sabatini-lala
Sat May 8 00:47:52 CEST 2010
---
ffplay.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index e84e290..a2e0d70 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -267,6 +267,7 @@ static int framedrop=1;
static int rdftspeed=20;
#if CONFIG_AVFILTER
static char *vfilters = NULL;
+static unsigned int sws_flags = SWS_BICUBIC;
#endif
/* current context */
@@ -1766,9 +1767,11 @@ static int video_thread(void *arg)
#if CONFIG_AVFILTER
int64_t pos;
+ char sws_flags_str[128];
AVFilterContext *filt_src = NULL, *filt_out = NULL;
AVFilterGraph *graph = av_mallocz(sizeof(AVFilterGraph));
- graph->scale_sws_opts = av_strdup("sws_flags=bilinear");
+ snprintf(sws_flags_str, sizeof(sws_flags_str), "%d", sws_flags);
+ graph->scale_sws_opts = av_strdup(sws_flags_str);
if(!(filt_src = avfilter_open(&input_filter, "src"))) goto the_end;
if(!(filt_out = avfilter_open(&output_filter, "out"))) goto the_end;
--
1.7.0
More information about the ffmpeg-devel
mailing list