private void DecodePacket() { if (!reuseLastPacket) { if (IsBufferEmpty) { OwnerFile.GetPacketFromStream(Info.Index); } packet = BufferedPackets.Dequeue(); bufferSize -= packet.Pointer->size; } // Sends the packet to the decoder. var result = ffmpeg.avcodec_send_packet(Pointer, packet); if (result == ffmpeg.AVERROR(ffmpeg.EAGAIN)) { reuseLastPacket = true; } else { reuseLastPacket = false; result.ThrowIfError("Cannot send a packet to the decoder."); packet.Wipe(); } }
private void DecodePacket() { var pkt = OwnerFile.ReadNextPacket(Info.Index); // Sends the packet to the decoder. var result = ffmpeg.avcodec_send_packet(Pointer, pkt); if (result == ffmpeg.AVERROR(ffmpeg.EAGAIN)) { OwnerFile.ReuseLastPacket(); } else { result.ThrowIfError("Cannot send a packet to the decoder."); } }
public override int GetHashCode() => OwnerFile.GetHashCode() ^ Platform.GetHashCode();