Originally committed as revision 21584 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -115,6 +115,7 @@ typedef struct VideoState { · 114 unmodified lines | ||
| 115 | 115 | int seek_flags; |
| 116 | 116 | int64_t seek_pos; |
| 117 | 117 | int64_t seek_rel; |
| 118 | + int read_pause_return; | |
| 118 | 119 | AVFormatContext *ic; |
| 119 | 120 | int dtg_active_format; |
| 120 | 121 | |
| @@ -991,8 +992,12 @@ static void stream_pause(VideoState *is) · 870 unmodified lines | ||
| 991 | 992 | { |
| 992 | 993 | is->paused = !is->paused; |
| 993 | 994 | if (!is->paused) { |
| 994 | − is->video_current_pts = get_video_clock(is); | |
| 995 | + if(is->read_pause_return != AVERROR(ENOSYS)){ | |
| 996 | + is->video_current_pts = get_video_clock(is); | |
| 997 | + } | |
| 998 | + | |
| 995 | 999 | is->frame_timer += (av_gettime() - is->video_current_pts_time) / 1000000.0; |
| 1000 | + is->video_current_pts_time= av_gettime(); | |
| 996 | 1001 | } |
| 997 | 1002 | } |
| 998 | 1003 | |
| @@ -2007,7 +2012,7 @@ static int decode_thread(void *arg) · 1008 unmodified lines | ||
| 2007 | 2012 | if (is->paused != is->last_paused) { |
| 2008 | 2013 | is->last_paused = is->paused; |
| 2009 | 2014 | if (is->paused) |
| 2010 | − av_read_pause(ic); | |
| 2015 | + is->read_pause_return= av_read_pause(ic); | |
| 2011 | 2016 | else |
| 2012 | 2017 | av_read_play(ic); |
| 2013 | 2018 | } |