[vlc-commits] picture_fifo: avoid shadow variable
Rémi Denis-Courmont
git at videolan.org
Sun Sep 21 10:40:03 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep 18 18:11:13 2014 +0300| [8c4a98931892dc1bd55e5f965f2d67a92c082317] | committer: Rémi Denis-Courmont
picture_fifo: avoid shadow variable
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c4a98931892dc1bd55e5f965f2d67a92c082317
---
src/misc/picture_fifo.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/misc/picture_fifo.c b/src/misc/picture_fifo.c
index 0734ca9..5e99992 100644
--- a/src/misc/picture_fifo.c
+++ b/src/misc/picture_fifo.c
@@ -127,12 +127,8 @@ void picture_fifo_Flush(picture_fifo_t *fifo, mtime_t date, bool flush_before)
}
vlc_mutex_unlock(&fifo->lock);
- for (;;) {
- picture_t *picture = PictureFifoPop(&tmp);
- if (!picture)
- break;
+ while ((picture = PictureFifoPop(&tmp)) != NULL)
picture_Release(picture);
- }
}
void picture_fifo_OffsetDate(picture_fifo_t *fifo, mtime_t delta)
{
More information about the vlc-commits
mailing list