Ticket #540: ffplay.diff

File ffplay.diff, 784 bytes (added by coder@…, 20 years ago)

Modification to ffplay that causes the bug to appear

  • ffplay.c

     
    18961896            SDL_LockMutex(is->video_decoder_mutex);
    18971897            SDL_LockMutex(is->audio_decoder_mutex);
    18981898            SDL_LockMutex(is->subtitle_decoder_mutex);
    1899             ret = av_seek_frame(is->ic, -1, is->seek_pos, is->seek_flags);
     1899            int64_t seek_stream_pos =
     1900                   ((int64_t)is->seek_pos/av_q2d(is->video_st->time_base))/AV_TIME_BASE;
     1901            ret = av_seek_frame(is->ic, video_index,
     1902                           seek_stream_pos, is->seek_flags);
    19001903            if (ret < 0) {
    19011904                fprintf(stderr, "%s: error while seeking\n", is->ic->filename);
    19021905            }else{