1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-06 08:15:34 +00:00

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

This commit is contained in:
Bret Curtis 2015-11-12 12:44:40 +01:00
parent 9d5e7b34c6
commit 39f89f967b

View file

@ -85,6 +85,9 @@ void VideoState::setAudioFactory(MovieAudioFactory *factory)
void PacketQueue::put(AVPacket *pkt)
{
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));
if(!pkt1) throw std::bad_alloc();
pkt1->pkt = *pkt;