aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2013-02-10 00:29:29 +0100
committerMarton Balint <cus@passwd.hu>2013-02-27 21:34:12 +0100
commit36dc476f83f7e5c4849e1c37f1cc9dc7ef75079d (patch)
treef4f70754a869fa4ddb8efbf2356d4e78d80ab450 /ffplay.c
parent3070600d9b14b2e48637eb252a48b388195fda58 (diff)
downloadffmpeg-36dc476f83f7e5c4849e1c37f1cc9dc7ef75079d.tar.gz
ffplay: return true for pictq_prev_picture if it was successful
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index 4f24a32fe9..0d4fde6344 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1255,8 +1255,9 @@ static void pictq_next_picture(VideoState *is) {
SDL_UnlockMutex(is->pictq_mutex);
}
-static void pictq_prev_picture(VideoState *is) {
+static int pictq_prev_picture(VideoState *is) {
VideoPicture *prevvp;
+ int ret = 0;
/* update queue size and signal for the previous picture */
prevvp = &is->pictq[(is->pictq_rindex + VIDEO_PICTURE_QUEUE_SIZE - 1) % VIDEO_PICTURE_QUEUE_SIZE];
if (prevvp->allocated && prevvp->serial == is->videoq.serial) {
@@ -1265,10 +1266,12 @@ static void pictq_prev_picture(VideoState *is) {
if (--is->pictq_rindex == -1)
is->pictq_rindex = VIDEO_PICTURE_QUEUE_SIZE - 1;
is->pictq_size++;
+ ret = 1;
}
SDL_CondSignal(is->pictq_cond);
SDL_UnlockMutex(is->pictq_mutex);
}
+ return ret;
}
static void update_video_pts(VideoState *is, double pts, int64_t pos, int serial) {