[FFmpeg-devel] [PATCH 04/10] ffplay: return true for pictq_prev_picture if it was successful
Marton Balint
cus at passwd.hu
Sat Feb 23 02:30:35 CET 2013
Signed-off-by: Marton Balint <cus at passwd.hu>
---
ffplay.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ffplay.c b/ffplay.c
index 88aa2e7..6248b8d 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) {
--
1.7.10.4
More information about the ffmpeg-devel
mailing list