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 <michael@niedermayer.cc>2015-08-08 17:47:21 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-08-08 17:51:25 +0300
commit5edab1d207d211962b8b0e9ffdebf774aa6ee688 (patch)
treebc424e355483a19fe99584cc115cc5a90cef2fc1 /ffplay.c
parent408c9cf0e21d83d21865c3e27e1c44a9da30a98c (diff)
cmdutils: remove sws_opts usage, simplify code
It has become unused as all code was switched to AVDictionary Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index 7e673f0cd8..9d9e1083e4 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -102,7 +102,7 @@ const int program_birth_year = 2003;
#define CURSOR_HIDE_DELAY 1000000
-static int64_t sws_flags = SWS_BICUBIC;
+static unsigned sws_flags = SWS_BICUBIC;
typedef struct MyAVPacketList {
AVPacket pkt;
@@ -1677,7 +1677,18 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, double
av_picture_copy(&pict, (AVPicture *)src_frame,
src_frame->format, vp->width, vp->height);
#else
- av_opt_get_int(sws_opts, "sws_flags", 0, &sws_flags);
+ {
+ AVDictionaryEntry *e = av_dict_get(sws_dict, "sws_flags", NULL, 0);
+ if (e) {
+ const AVClass *class = sws_get_class();
+ const AVOption *o = av_opt_find(&class, "sws_flags", NULL, 0,
+ AV_OPT_SEARCH_FAKE_OBJ);
+ int ret = av_opt_eval_flags(&class, o, e->value, &sws_flags);
+ if (ret < 0)
+ exit(1);
+ }
+ }
+
is->img_convert_ctx = sws_getCachedContext(is->img_convert_ctx,
vp->width, vp->height, src_frame->format, vp->width, vp->height,
AV_PIX_FMT_YUV420P, sws_flags, NULL, NULL, NULL);