Revision 1d6c82d4 ffplay.c

View differences:

ffplay.c
168 168
    AVAudioConvert *reformat_ctx;
169 169

  
170 170
    enum ShowMode {
171
        SHOW_MODE_VIDEO = 0, SHOW_MODE_WAVES, SHOW_MODE_RDFT, SHOW_MODE_NB
171
        SHOW_MODE_NONE = -1, SHOW_MODE_VIDEO = 0, SHOW_MODE_WAVES, SHOW_MODE_RDFT, SHOW_MODE_NB
172 172
    } show_mode;
173 173
    int16_t sample_array[SAMPLE_ARRAY_SIZE];
174 174
    int sample_array_index;
......
264 264
static int exit_on_mousedown;
265 265
static int loop=1;
266 266
static int framedrop=1;
267
static enum ShowMode show_mode = SHOW_MODE_VIDEO;
267
static enum ShowMode show_mode = SHOW_MODE_NONE;
268 268

  
269 269
static int rdftspeed=20;
270 270
#if CONFIG_AVFILTER
......
2471 2471
        ret= stream_component_open(is, st_index[AVMEDIA_TYPE_VIDEO]);
2472 2472
    }
2473 2473
    is->refresh_tid = SDL_CreateThread(refresh_thread, is);
2474
    if(ret<0) {
2475
        if (!display_disable)
2476
            is->show_mode = SHOW_MODE_RDFT;
2477
    }
2474
    if (is->show_mode == SHOW_MODE_NONE)
2475
        is->show_mode = ret >= 0 ? SHOW_MODE_VIDEO : SHOW_MODE_RDFT;
2478 2476

  
2479 2477
    if (st_index[AVMEDIA_TYPE_SUBTITLE] >= 0) {
2480 2478
        stream_component_open(is, st_index[AVMEDIA_TYPE_SUBTITLE]);

Also available in: Unified diff