Commit 59a22751 authored by aurel's avatar aurel

Take account of struct size in total packet queue size tracking.

fix issue806


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17476 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cc20568d
......@@ -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;
......
Markdown is supported
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