summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2009-02-21 16:01:52 +0000
committerAurelien Jacobs <aurel@gnuage.org>2009-02-21 16:01:52 +0000
commit7b776589a2d3bc7c9d4e8f73cc47be3e73bad486 (patch)
treeff9b9d8727400317604e7a3866397d82249c627a /ffplay.c
parent31f2616db86fb50174bc053f26c14db7c03e3685 (diff)
Take account of struct size in total packet queue size tracking.
fix issue806 Originally committed as revision 17476 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index 964408bcc3..c3af259328 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -282,7 +282,7 @@ static int packet_queue_put(PacketQueue *q, AVPacket *pkt)
q->last_pkt->next = pkt1;
q->last_pkt = pkt1;
q->nb_packets++;
- q->size += pkt1->pkt.size;
+ q->size += pkt1->pkt.size + sizeof(*pkt1);
/* XXX: should duplicate packet data in DV case */
SDL_CondSignal(q->cond);
@@ -321,7 +321,7 @@ static int packet_queue_get(PacketQueue *q, AVPacket *pkt, int block)
if (!q->first_pkt)
q->last_pkt = NULL;
q->nb_packets--;
- q->size -= pkt1->pkt.size;
+ q->size -= pkt1->pkt.size + sizeof(*pkt1);
*pkt = pkt1->pkt;
av_free(pkt1);
ret = 1;