The new name is less misleading, since the function will resume the
stream if it is currently paused.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
... | ... |
@@ -1064,7 +1064,7 @@ static void stream_seek(VideoState *is, int64_t pos, int64_t rel, int seek_by_by |
1064 | 1064 |
} |
1065 | 1065 |
|
1066 | 1066 |
/* pause or resume the video */ |
1067 |
-static void stream_pause(VideoState *is) |
|
1067 |
+static void stream_toggle_pause(VideoState *is) |
|
1068 | 1068 |
{ |
1069 | 1069 |
if (is->paused) { |
1070 | 1070 |
is->frame_timer += av_gettime() / 1000000.0 + is->video_current_pts_drift - is->video_current_pts; |
... | ... |
@@ -1865,7 +1865,7 @@ static int video_thread(void *arg) |
1865 | 1865 |
|
1866 | 1866 |
if (step) |
1867 | 1867 |
if (cur_stream) |
1868 |
- stream_pause(cur_stream); |
|
1868 |
+ stream_toggle_pause(cur_stream); |
|
1869 | 1869 |
} |
1870 | 1870 |
the_end: |
1871 | 1871 |
#if CONFIG_AVFILTER |
... | ... |
@@ -1944,7 +1944,7 @@ static int subtitle_thread(void *arg) |
1944 | 1944 |
av_free_packet(pkt); |
1945 | 1945 |
// if (step) |
1946 | 1946 |
// if (cur_stream) |
1947 |
-// stream_pause(cur_stream); |
|
1947 |
+// stream_toggle_pause(cur_stream); |
|
1948 | 1948 |
} |
1949 | 1949 |
the_end: |
1950 | 1950 |
return 0; |
... | ... |
@@ -2713,7 +2713,7 @@ static void toggle_full_screen(void) |
2713 | 2713 |
static void toggle_pause(void) |
2714 | 2714 |
{ |
2715 | 2715 |
if (cur_stream) |
2716 |
- stream_pause(cur_stream); |
|
2716 |
+ stream_toggle_pause(cur_stream); |
|
2717 | 2717 |
step = 0; |
2718 | 2718 |
} |
2719 | 2719 |
|
... | ... |
@@ -2722,7 +2722,7 @@ static void step_to_next_frame(void) |
2722 | 2722 |
if (cur_stream) { |
2723 | 2723 |
/* if the stream is paused unpause it, then step */ |
2724 | 2724 |
if (cur_stream->paused) |
2725 |
- stream_pause(cur_stream); |
|
2725 |
+ stream_toggle_pause(cur_stream); |
|
2726 | 2726 |
} |
2727 | 2727 |
step = 1; |
2728 | 2728 |
} |