Browse code

avplay: Do not use removed av_get_int()

Fixes build with lavfi disabled.

Signed-off-by: Diego Biurrun <diego@biurrun.de>

Anton Khirnov authored on 2012/11/29 05:23:57
Showing 1 changed files
... ...
@@ -84,7 +84,7 @@ const int program_birth_year = 2003;
84 84
 /* NOTE: the size must be big enough to compensate the hardware audio buffersize size */
85 85
 #define SAMPLE_ARRAY_SIZE (2 * 65536)
86 86
 
87
-static int sws_flags = SWS_BICUBIC;
87
+static int64_t sws_flags = SWS_BICUBIC;
88 88
 
89 89
 typedef struct PacketQueue {
90 90
     AVPacketList *first_pkt, *last_pkt;
... ...
@@ -1398,7 +1398,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t
1398 1398
         av_picture_copy(&pict, &pict_src,
1399 1399
                         vp->pix_fmt, vp->width, vp->height);
1400 1400
 #else
1401
-        sws_flags = av_get_int(sws_opts, "sws_flags", NULL);
1401
+        av_opt_get_int(sws_opts, "sws_flags", 0, &sws_flags);
1402 1402
         is->img_convert_ctx = sws_getCachedContext(is->img_convert_ctx,
1403 1403
             vp->width, vp->height, vp->pix_fmt, vp->width, vp->height,
1404 1404
             dst_pix_fmt, sws_flags, NULL, NULL, NULL);
... ...
@@ -1515,7 +1515,7 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
1515 1515
     AVFilterContext *filt_src = NULL, *filt_out = NULL, *filt_format;
1516 1516
     AVCodecContext *codec = is->video_st->codec;
1517 1517
 
1518
-    snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags);
1518
+    snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%"PRId64, sws_flags);
1519 1519
     graph->scale_sws_opts = av_strdup(sws_flags_str);
1520 1520
 
1521 1521
     snprintf(buffersrc_args, sizeof(buffersrc_args), "%d:%d:%d:%d:%d:%d:%d",