Browse code

ffplay: warn that -s is no longer working, suggest alternative

Also remove now unused variables.

Signed-off-by: Anton Khirnov <anton@khirnov.net>

Stefano Sabatini authored on 2011/07/17 06:08:06
Showing 2 changed files
... ...
@@ -38,8 +38,8 @@ Force displayed width.
38 38
 @item -y @var{height}
39 39
 Force displayed height.
40 40
 @item -s @var{size}
41
-Set frame size (WxH or abbreviation), needed for videos which don't
42
-contain a header with the frame size like raw YUV.
41
+This option has been removed. Use private format options for specifying the
42
+input video size.
43 43
 @item -an
44 44
 Disable audio.
45 45
 @item -vn
... ...
@@ -226,8 +226,6 @@ static int fs_screen_width;
226 226
 static int fs_screen_height;
227 227
 static int screen_width = 0;
228 228
 static int screen_height = 0;
229
-static int frame_width = 0;
230
-static int frame_height = 0;
231 229
 static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE;
232 230
 static int audio_disable;
233 231
 static int video_disable;
... ...
@@ -2823,15 +2821,9 @@ static void event_loop(void)
2823 2823
 
2824 2824
 static int opt_frame_size(const char *opt, const char *arg)
2825 2825
 {
2826
-    if (av_parse_video_size(&frame_width, &frame_height, arg) < 0) {
2827
-        fprintf(stderr, "Incorrect frame size\n");
2828
-        return AVERROR(EINVAL);
2829
-    }
2830
-    if ((frame_width % 2) != 0 || (frame_height % 2) != 0) {
2831
-        fprintf(stderr, "Frame size must be a multiple of 2\n");
2832
-        return AVERROR(EINVAL);
2833
-    }
2834
-    return 0;
2826
+    av_log(NULL, AV_LOG_ERROR,
2827
+           "Option '%s' has been removed, use private format options instead\n", opt);
2828
+    return AVERROR(EINVAL);
2835 2829
 }
2836 2830
 
2837 2831
 static int opt_width(const char *opt, const char *arg)