[vlc-commits] commit: Changed picture_fifo_Pop/picture_pool_Get to set picture_t:: p_next to NULL. (Laurent Aimar )

git at videolan.org git at videolan.org
Sun Jan 9 22:00:52 CET 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jan  9 21:46:26 2011 +0100| [e2ec60cea8b4b9a0afd8b3b3f5517aa5e7657fbb] | committer: Laurent Aimar 

Changed picture_fifo_Pop/picture_pool_Get to set picture_t::p_next to NULL.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e2ec60cea8b4b9a0afd8b3b3f5517aa5e7657fbb
---

 src/misc/picture_fifo.c         |    1 +
 src/misc/picture_pool.c         |    1 +
 src/video_output/video_output.c |    1 -
 3 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/misc/picture_fifo.c b/src/misc/picture_fifo.c
index 052ad08..b7e8c03 100644
--- a/src/misc/picture_fifo.c
+++ b/src/misc/picture_fifo.c
@@ -62,6 +62,7 @@ static picture_t *PictureFifoPop(picture_fifo_t *fifo)
         fifo->first = picture->p_next;
         if (!fifo->first)
             fifo->last_ptr = &fifo->first;
+        picture->p_next = NULL;
     }
     return picture;
 }
diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index 39ae0f8..05cfed1 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -223,6 +223,7 @@ picture_t *picture_pool_Get(picture_pool_t *pool)
             continue;
 
         /* */
+        picture->p_next = NULL;
         picture->p_release_sys->tick = pool->tick++;
         picture_Hold(picture);
         return picture;
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 9c1150c..32fcde8 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -401,7 +401,6 @@ picture_t *vout_GetPicture(vout_thread_t *vout)
     picture_t *picture = picture_pool_Get(vout->p->decoder_pool);
     if (picture) {
         picture_Reset(picture);
-        picture->p_next = NULL;
         VideoFormatCopyCropAr(&picture->format, &vout->p->original);
     }
     vlc_mutex_unlock(&vout->p->picture_lock);



More information about the vlc-commits mailing list