You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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
This commit is contained in:
4
ffplay.c
4
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;
|
||||
|
Reference in New Issue
Block a user