aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-05-08 21:39:57 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-05-08 21:39:57 +0000
commit3f073fa22cb298adb4b58ddf1d64e4c4733e75cc (patch)
tree4b9ebcbbae556a847dcc4758cd3945c9f47b92b1
parent3fe1ec39c6eeba3348e3824df0d185525c321d57 (diff)
downloadffmpeg-3f073fa22cb298adb4b58ddf1d64e4c4733e75cc.tar.gz
Fix auto-scaling.
Use the numeric value assigned to sws_flags for the sws_flags set in the graph, rather than the string "bilinear", which is not even parsable by the scale filter. Originally committed as revision 23060 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffplay.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ffplay.c b/ffplay.c
index e84e290be7..512f5238eb 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -80,9 +80,7 @@ const int program_birth_year = 2003;
/* NOTE: the size must be big enough to compensate the hardware audio buffersize size */
#define SAMPLE_ARRAY_SIZE (2*65536)
-#if !CONFIG_AVFILTER
static int sws_flags = SWS_BICUBIC;
-#endif
typedef struct PacketQueue {
AVPacketList *first_pkt, *last_pkt;
@@ -1766,9 +1764,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), "flags=%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;