Fix a possible crash when a packet was freed on audio playback

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
Alexis Maiquez 2023-02-07 04:16:43 +01:00
parent 490718c22b
commit 476d45be0a

View File

@ -57,7 +57,7 @@ int audio_read_thread (void* arg)
if (packet->stream_index == stream->getAudioStream ())
stream->queuePacket (packet);
else
av_packet_free (&packet);
av_packet_unref (packet);
if (stream->isInitialized () == false)
break;