from kcat: We can't simply get rid of this, otherwise it may break for certain kinds of packets.

pull/800/head
Bret Curtis 9 years ago
parent 9d5e7b34c6
commit 39f89f967b

@ -85,6 +85,9 @@ void VideoState::setAudioFactory(MovieAudioFactory *factory)
void PacketQueue::put(AVPacket *pkt) void PacketQueue::put(AVPacket *pkt)
{ {
AVPacketList *pkt1; AVPacketList *pkt1;
if(pkt != &flush_pkt && !pkt->buf && av_dup_packet(pkt) < 0)
throw std::runtime_error("Failed to duplicate packet");
pkt1 = (AVPacketList*)av_malloc(sizeof(AVPacketList)); pkt1 = (AVPacketList*)av_malloc(sizeof(AVPacketList));
if(!pkt1) throw std::bad_alloc(); if(!pkt1) throw std::bad_alloc();
pkt1->pkt = *pkt; pkt1->pkt = *pkt;

Loading…
Cancel
Save