Commit d63659ad authored by Steve Lhomme's avatar Steve Lhomme
Browse files

picture_fifo: remove unneeded local functions

They only do simple calls each. Let's do the calls directly.
parent adbdca2e
......@@ -41,20 +41,6 @@ struct picture_fifo_t {
vlc_picture_chain_t pics;
};
static void PictureFifoReset(picture_fifo_t *fifo)
{
vlc_picture_chain_Init( &fifo->pics );
}
static void PictureFifoPush(picture_fifo_t *fifo, picture_t *picture)
{
assert(!picture_HasChainedPics(picture));
vlc_picture_chain_Append( &fifo->pics, picture );
}
static picture_t *PictureFifoPop(picture_fifo_t *fifo)
{
return vlc_picture_chain_PopFront( &fifo->pics );
}
picture_fifo_t *picture_fifo_New(void)
{
picture_fifo_t *fifo = malloc(sizeof(*fifo));
......@@ -62,20 +48,21 @@ picture_fifo_t *picture_fifo_New(void)
return NULL;
vlc_mutex_init(&fifo->lock);
PictureFifoReset(fifo);
vlc_picture_chain_Init( &fifo->pics );
return fifo;
}
void picture_fifo_Push(picture_fifo_t *fifo, picture_t *picture)
{
vlc_mutex_lock(&fifo->lock);
PictureFifoPush(fifo, picture);
assert(!picture_HasChainedPics(picture));
vlc_picture_chain_Append( &fifo->pics, picture );
vlc_mutex_unlock(&fifo->lock);
}
picture_t *picture_fifo_Pop(picture_fifo_t *fifo)
{
vlc_mutex_lock(&fifo->lock);
picture_t *picture = PictureFifoPop(fifo);
picture_t *picture = vlc_picture_chain_PopFront( &fifo->pics );
vlc_mutex_unlock(&fifo->lock);
return picture;
......@@ -110,7 +97,10 @@ void picture_fifo_Flush(picture_fifo_t *fifo, vlc_tick_t date, bool flush_before
(!flush_before && picture->date >= date))
vlc_picture_chain_Append( &flush_chain, picture );
else
PictureFifoPush(fifo, picture);
{
assert(!picture_HasChainedPics(picture));
vlc_picture_chain_Append( &fifo->pics, picture );
}
}
}
vlc_mutex_unlock(&fifo->lock);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment