changeset 1398:303e9fb547c7 libavformat

avoid overwriting pkt
author bcoudurier
date Tue, 17 Oct 2006 17:44:06 +0000
parents 21755fe31dd7
children 5a3003271ad8
files gxfenc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gxfenc.c	Tue Oct 17 17:19:11 2006 +0000
+++ b/gxfenc.c	Tue Oct 17 17:44:06 2006 +0000
@@ -792,7 +792,7 @@
                 pkt = NULL;
             }
             if (flush || av_fifo_size(&sc->audio_buffer) >= GXF_AUDIO_PACKET_SIZE) {
-                if (gxf_new_audio_packet(gxf, sc, &new_pkt, flush) > 0) {
+                if (!pkt && gxf_new_audio_packet(gxf, sc, &new_pkt, flush) > 0) {
                     pkt = &new_pkt;
                     break; /* add pkt right now into list */
                 }