avoid overwriting pkt

Originally committed as revision 6723 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2006-10-17 17:44:06 +00:00
parent 595da759de
commit 5b9d79bd77
1 changed files with 1 additions and 1 deletions

View File

@ -792,7 +792,7 @@ static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pk
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 */
}