Signed-off-by: Marton Balint <cus@passwd.hu>
Marton Balint authored on 2013/02/10 08:29:29... | ... |
@@ -1255,8 +1255,9 @@ static void pictq_next_picture(VideoState *is) { |
1255 | 1255 |
SDL_UnlockMutex(is->pictq_mutex); |
1256 | 1256 |
} |
1257 | 1257 |
|
1258 |
-static void pictq_prev_picture(VideoState *is) { |
|
1258 |
+static int pictq_prev_picture(VideoState *is) { |
|
1259 | 1259 |
VideoPicture *prevvp; |
1260 |
+ int ret = 0; |
|
1260 | 1261 |
/* update queue size and signal for the previous picture */ |
1261 | 1262 |
prevvp = &is->pictq[(is->pictq_rindex + VIDEO_PICTURE_QUEUE_SIZE - 1) % VIDEO_PICTURE_QUEUE_SIZE]; |
1262 | 1263 |
if (prevvp->allocated && prevvp->serial == is->videoq.serial) { |
... | ... |
@@ -1265,10 +1266,12 @@ static void pictq_prev_picture(VideoState *is) { |
1265 | 1265 |
if (--is->pictq_rindex == -1) |
1266 | 1266 |
is->pictq_rindex = VIDEO_PICTURE_QUEUE_SIZE - 1; |
1267 | 1267 |
is->pictq_size++; |
1268 |
+ ret = 1; |
|
1268 | 1269 |
} |
1269 | 1270 |
SDL_CondSignal(is->pictq_cond); |
1270 | 1271 |
SDL_UnlockMutex(is->pictq_mutex); |
1271 | 1272 |
} |
1273 |
+ return ret; |
|
1272 | 1274 |
} |
1273 | 1275 |
|
1274 | 1276 |
static void update_video_pts(VideoState *is, double pts, int64_t pos, int serial) { |